Delay ZM service, better way

Post Reply
zemerdon
Site Admin
Posts: 255
Joined: Mon Jan 23, 2023 8:13 pm

Delay ZM service, better way

Post by zemerdon »

root@nvr:/home/zemerdon# cat /etc/systemd/system/multi-user.target.wants/zoneminder.service

Code: Select all

# ZoneMinder systemd unit file
# This file is intended to work with Debian distributions

[Unit]
Description=ZoneMinder CCTV recording and surveillance system
After=network.target mysql.service
# Remarked out so that it will start ZM on machines that don't have mysql installed
#Requires=mysql.service

[Service]
#User=www-data
Type=forking
ExecStartPre=/bin/sleep 60
ExecStart=/usr/bin/zmpkg.pl start
ExecReload=/usr/bin/zmpkg.pl restart
ExecStop=/usr/bin/zmpkg.pl stop
PIDFile=/run/zm/zm.pid
Restart=always
RestartSec=10
Environment=TZ=:/etc/localtime
TimeoutSec=600

[Install]
WantedBy=multi-user.target
Post Reply