oebb_py/oebbapi.service

21 lines
558 B
Desktop File

[Unit]
Description = OEBBAPI
After = network.target
[Service]
PermissionsStartOnly = true
PIDFile = /run/oebbapi/oebbapi.pid
User = oebb
Group = oebb
WorkingDirectory = /opt/oebbapi
ExecStartPre = /bin/mkdir /run/oebbapi
ExecStartPre = /bin/chown -R oebb:oebb /run/oebbapi
ExecStart = /usr/bin/env gunicorn -c gunicorn.cfg --pid /run/oebbapi/oebbapi.pid main
ExecReload = /bin/kill -s HUP $MAINPID
ExecStop = /bin/kill -s TERM $MAINPID
ExecStopPost = /bin/rm -rf /run/oebbapi
PrivateTmp = true
[Install]
WantedBy = multi-user.target