use systemd instead of SysV init script

nimn-master
Hartmut Holzgraefe 2016-04-03 12:20:24 +02:00
rodzic ce2b4ec94c
commit 189b789a9a
2 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -0,0 +1,14 @@
[Unit]
Description=Maposmatic render daemon
After=multi-user.target
Wants=postgresql.service
[Service]
Type=idle
User=maposmatic
ExecStart=/usr/bin/python /path/to/maposmatic/scripts/wrapper.py scripts/daemon.py
[Install]
WantedBy=multi-user.target

Wyświetl plik

@ -271,7 +271,7 @@ REFRESH_JOB_WAITING = 30
REFRESH_JOB_RENDERING = 15
def is_daemon_running():
return os.path.exists(MAPOSMATIC_PID_FILE)
return 0 == os.system('systemctl is-active maposmatic-render.service')
# Logging
logconfig.setup_maposmatic_logging(