1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/weblate_ynh.git synced 2024-10-01 13:35:04 +02:00
weblate_ynh/conf/celery-weblate.service
2019-05-30 20:51:22 +02:00

28 lines
1,012 B
Desktop File

[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__/
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RuntimeDirectory=
RuntimeDirectory=__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} \
-A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
--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} \
-A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
--logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}
[Install]
WantedBy=multi-user.target