From c6444a83790aa370f5e39c11cbeceda6e8878e26 Mon Sep 17 00:00:00 2001 From: John Turner Date: Fri, 5 Sep 2025 19:28:08 -0400 Subject: add openrc service and conf files --- pypaste-confd | 14 ++++++++++++++ pypaste-initd | 30 ++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 pypaste-confd create mode 100644 pypaste-initd diff --git a/pypaste-confd b/pypaste-confd new file mode 100644 index 0000000..5f98142 --- /dev/null +++ b/pypaste-confd @@ -0,0 +1,14 @@ +# /etc/conf.d/pypaste + +PYPASTE_SITE="" +PYPASTE_CONTENT_LENGTH_MAX_BYTES="2000000" # 2M +PYPASTE_ENDPOINT="" +PYPASTE_REGION="" +PYPASTE_BUCKET="" +PYPASTE_ACCESS_KEY="" +PYPASTE_SECRET_KEY="" +PYPASTE_S3_MAX_BYTES="1000000000" # 1G + +PYPASTE_USER="pypaste" + +PYPASTE_ARGS="--line-numbers" \ No newline at end of file diff --git a/pypaste-initd b/pypaste-initd new file mode 100644 index 0000000..6fe3bbf --- /dev/null +++ b/pypaste-initd @@ -0,0 +1,30 @@ +#!/sbin/openrc-run + +command="/usr/bin/pypaste" + +command_args="\ +--site=${PYPASTE_SITE} \ +--content-length-max-bytes=${PYPASTE_CONTENT_LENGTH_MAX_BYTES} \ +--endpoint=${PYPASTE_ENDPOINT} \ +--region=${PYPASTE_REGION} \ +--bucket=${PYPASTE_BUCKET} \ +--access-key=${PYPASTE_ACCESS_KEY} \ +--secret-key=${PYPASTE_SECRET_KEY} \ +--s3-max-bytes=${PYPASTE_S3_MAX_BYTES} \ +--default-style=${PYPASTE_DEFAULT_STYLE} \ +${PYPASTE_ARGS} +" + +user="${PYPASTE_USER:-pypaste}" +group="${PYPYPASTE_GROUP:-pypaste}" + +start_stop_daemon_args="\ +--user ${user} \ +--group ${group} \ +--stderr ${PYPASTE_LOG_FILE}" + +depend() { + need net +} + + -- cgit v1.2.3