2018-10-19 23:28:40 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Celery Service for Weblate (__APP__)
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=forking
|
|
|
|
User=__APP__
|
|
|
|
Group=__APP__
|
|
|
|
PermissionsStartOnly=true
|
|
|
|
EnvironmentFile=__FINALPATH__/celery-weblate
|
|
|
|
WorkingDirectory=__FINALPATH__/
|
2018-10-24 22:08:30 +02:00
|
|
|
ExecStartPre=/bin/mkdir -p /var/run/__APP__-celery
|
|
|
|
ExecStartPre=/bin/chown -R __APP__ /var/run/__APP__-celery
|
|
|
|
ExecStartPre=/bin/mkdir -p /var/log/__APP__-celery
|
|
|
|
ExecStartPre=/bin/chown -R __APP__ /var/log/__APP__-celery
|
|
|
|
ExecStart=__FINALPATH__/venv/bin/celery multi start ${CELERYD_NODES} \
|
2018-10-19 23:28:40 +02:00
|
|
|
-A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
|
2018-10-24 22:08:30 +02:00
|
|
|
--logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}
|
|
|
|
ExecStop=__FINALPATH__/venv/bin/celery multi stopwait ${CELERYD_NODES} \
|
|
|
|
--pidfile=${CELERYD_PID_FILE}
|
|
|
|
ExecReload=__FINALPATH__/venv/bin/celery multi restart ${CELERYD_NODES} \
|
2018-10-19 23:28:40 +02:00
|
|
|
-A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
|
2018-10-24 22:08:30 +02:00
|
|
|
--logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}
|
2018-10-19 23:28:40 +02:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|