aboutsummaryrefslogtreecommitdiff
path: root/weblate/systemd-nonpriv/celery-weblate.service
diff options
context:
space:
mode:
Diffstat (limited to 'weblate/systemd-nonpriv/celery-weblate.service')
-rw-r--r--weblate/systemd-nonpriv/celery-weblate.service24
1 files changed, 24 insertions, 0 deletions
diff --git a/weblate/systemd-nonpriv/celery-weblate.service b/weblate/systemd-nonpriv/celery-weblate.service
new file mode 100644
index 0000000..bf84a03
--- /dev/null
+++ b/weblate/systemd-nonpriv/celery-weblate.service
@@ -0,0 +1,24 @@
+[Unit]
+Description=Celery Service (Weblate)
+After=network.target
+
+[Service]
+Type=forking
+#User=weblate
+#Group=weblate
+EnvironmentFile=/home/weblate/celery-weblate
+WorkingDirectory=/home/weblate
+RuntimeDirectory=celery
+RuntimeDirectoryPreserve=restart
+LogsDirectory=celery
+ExecStart=/bin/sh -c '${CELERY_BIN} multi start ${CELERYD_NODES} \
+ -A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
+ --logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}'
+ExecStop=/bin/sh -c '${CELERY_BIN} multi stopwait ${CELERYD_NODES} \
+ --pidfile=${CELERYD_PID_FILE}'
+ExecReload=/bin/sh -c '${CELERY_BIN} multi restart ${CELERYD_NODES} \
+ -A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
+ --logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}'
+
+[Install]
+WantedBy=multi-user.target