aboutsummaryrefslogtreecommitdiff
path: root/net-libs/meta-srht/files/meta.sr.ht-webhooks.initd
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/meta-srht/files/meta.sr.ht-webhooks.initd')
-rw-r--r--net-libs/meta-srht/files/meta.sr.ht-webhooks.initd24
1 files changed, 16 insertions, 8 deletions
diff --git a/net-libs/meta-srht/files/meta.sr.ht-webhooks.initd b/net-libs/meta-srht/files/meta.sr.ht-webhooks.initd
index e9a712f..4f71f13 100644
--- a/net-libs/meta-srht/files/meta.sr.ht-webhooks.initd
+++ b/net-libs/meta-srht/files/meta.sr.ht-webhooks.initd
@@ -1,15 +1,23 @@
#!/sbin/openrc-run
-# Copyright 2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-name="meta.sr.ht webhooks daemon"
-description=""
+name="meta.sr.ht-webhooks"
+description="meta.sr.ht webhook delivery service"
+supervisor=supervise-daemon
+META_USER=${META_USER:-meta-srht}
+LOCAL_PG=${LOCAL_PG:-yes}
+META_ARGS=${META_ARGS:-}
+LOGS=/var/log/meta.sr.ht-webhooks.log
+supervise_daemon_args="-1 $LOGS -2 $LOGS"
command="/usr/bin/celery"
-command_args="-A metasrht.webhooks worker --loglevel=INFO"
-command_user="meta-srht:meta-srht"
-command_background=true
+command_args="-A metasrht.webhooks worker --loglevel=info $META_ARGS"
+command_user="$META_USER:$META_USER"
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
need net
+ use redis
+ use postgresql
+}
+
+start_pre() {
+ checkpath -f "$LOGS" -m 644 -o "$META_USER:$META_USER"
}