summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pypaste-confd15
-rw-r--r--pypaste-initd45
2 files changed, 31 insertions, 29 deletions
diff --git a/pypaste-confd b/pypaste-confd
index 5f98142..5045059 100644
--- a/pypaste-confd
+++ b/pypaste-confd
@@ -1,14 +1,17 @@
# /etc/conf.d/pypaste
PYPASTE_SITE=""
-PYPASTE_CONTENT_LENGTH_MAX_BYTES="2000000" # 2M
+PYPASTE_CONTENT_LENGTH_MAX_BYTES="" # 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
+PYPASTE_S3_MAX_BYTES="" # 1G
+PYPASTE_DICTIONARY=""
+PYPASTE_KEY_LENGTH=""
+PYPASTE_DATABASE=""
+PYPASTE_LISTEN_SOCKET=""
+PYPASTE_LOG_FILE=""
+PYPASTE_DEFAULT_STYLE=""
+PYPASTE_ARGS="--line-numbers --path=${PYPASTE_LISTEN_SOCKET}"
diff --git a/pypaste-initd b/pypaste-initd
index 6fe3bbf..52c449d 100644
--- a/pypaste-initd
+++ b/pypaste-initd
@@ -1,30 +1,29 @@
#!/sbin/openrc-run
-command="/usr/bin/pypaste"
+depend() {
+ need net
+}
-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}
+supervisor=supervise-daemon
+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}
+ --key-length=${PYPASTE_KEY_LENGTH}
+ --dictionary=${PYPASTE_DICTIONARY}
+ --database=${PYPASTE_DATABASE}
+ --default-style=${PYPASTE_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
-}
+error_log="${PYPASTE_ERROR_LOG}"
+: "${command_user=pypaste:pypaste}"