2018-10-19 23:28:40 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Celery Service for Weblate (__APP__)
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=forking
|
|
|
|
User=__APP__
|
2020-05-04 00:34:25 +02:00
|
|
|
Group=www-data
|
2018-10-19 23:28:40 +02:00
|
|
|
PermissionsStartOnly=true
|
|
|
|
EnvironmentFile=__FINALPATH__/celery-weblate
|
|
|
|
WorkingDirectory=__FINALPATH__/
|
2019-02-25 23:09:47 +01:00
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RuntimeDirectory=
|
2019-08-28 00:09:23 +02:00
|
|
|
RuntimeDirectory=__APP__
|
2019-02-25 23:09:47 +01:00
|
|
|
|
2019-08-28 00:09:23 +02:00
|
|
|
ExecStartPre=/bin/chown -R __APP__ /var/log/__APP__
|
2019-02-25 23:09:47 +01:00
|
|
|
|
2019-08-30 22:21:30 +02:00
|
|
|
ExecStart=/bin/sh -c '${CELERY_BIN} multi start ${CELERYD_NODES} \
|
2018-10-19 23:28:40 +02:00
|
|
|
-A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
|
2019-08-30 22:21:30 +02:00
|
|
|
--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} \
|
2018-10-19 23:28:40 +02:00
|
|
|
-A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
|
2019-08-30 22:21:30 +02:00
|
|
|
--logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}'
|
2018-10-19 23:28:40 +02:00
|
|
|
|
|
|
|
[Install]
|
2019-05-30 20:51:22 +02:00
|
|
|
WantedBy=multi-user.target
|