improved systemd file which recovers more easily from crashes

master
missytake 2020-01-15 19:57:18 +01:00
parent 0a30876f19
commit 1ad7f6f130
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
[Unit]
Description=Ticketfrei Backend
After=syslog.target network.target
StartLimitIntervalSec=300
StartLimitBurst=3
[Service]
WorkingDirectory=/srv/ticketfrei
ExecStart=/srv/ticketfrei/bin/python3 backend.py
# Requires systemd version 211 or newer
#RuntimeDirectory=uwsgi
Restart=always
RestartSec=60
KillSignal=SIGQUIT
Type=simple
StandardError=syslog
NotifyAccess=all
[Install]
WantedBy=multi-user.target