kopia lustrzana https://github.com/hholzgra/maposmatic/
use systemd instead of SysV init script
rodzic
ce2b4ec94c
commit
189b789a9a
|
@ -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
|
||||
|
||||
|
|
@ -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(
|
||||
|
|
Ładowanie…
Reference in New Issue