debian: add systemd unit file
This commit is contained in:
parent
1b02acc3c8
commit
87602c0ca3
|
@ -3,6 +3,7 @@ Section: python
|
|||
Priority: optional
|
||||
Maintainer: Benjamin Dauvergne <bdauvergne@entrouvert.com>
|
||||
Build-Depends: debhelper (>= 9),
|
||||
dh-systemd,
|
||||
python-setuptools,
|
||||
python-all,
|
||||
python-django
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
#export DH_VERBOSE=1
|
||||
|
||||
%:
|
||||
dh $@ --with python2
|
||||
dh $@ --with python2,systemd
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
[Unit]
|
||||
Description=Zoo
|
||||
After=network.target syslog.target postgresql.service
|
||||
Wants=postgresql.service
|
||||
|
||||
[Service]
|
||||
Environment=ZOO_SETTINGS_FILE=/usr/lib/%p/debian_config.py
|
||||
Environment=LANG=C.UTF-8
|
||||
User=%p
|
||||
Group=%p
|
||||
ExecStartPre=/usr/bin/zoo-manage migrate_schemas --noinput
|
||||
ExecStartPre=/usr/bin/zoo-manage collectstatic --noinput
|
||||
ExecStart=/usr/bin/uwsgi --ini /etc/%p/uwsgi.ini
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillSignal=SIGQUIT
|
||||
PrivateTmp=true
|
||||
Restart=on-failure
|
||||
RuntimeDirectory=zoo
|
||||
Type=notify
|
||||
StandardError=syslog
|
||||
NotifyAccess=all
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue