summaryrefslogtreecommitdiff
path: root/install/celery.service.template
diff options
context:
space:
mode:
Diffstat (limited to 'install/celery.service.template')
-rw-r--r--install/celery.service.template21
1 files changed, 21 insertions, 0 deletions
diff --git a/install/celery.service.template b/install/celery.service.template
new file mode 100644
index 000000000..ecb88526e
--- /dev/null
+++ b/install/celery.service.template
@@ -0,0 +1,21 @@
+[Unit]
+Description=Celery Server #APP_NAME#
+After=network.target
+
+[Service]
+Type=forking
+User=celery
+Group=celery
+EnvironmentFile=/etc/default/celeryd-#APP_NAME#
+WorkingDirectory=#INSTALL_PATH#
+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 \ No newline at end of file