summaryrefslogtreecommitdiff
path: root/pypaste-initd
diff options
context:
space:
mode:
Diffstat (limited to 'pypaste-initd')
-rw-r--r--pypaste-initd30
1 files changed, 30 insertions, 0 deletions
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
+}
+
+