diff options
Diffstat (limited to 'pcr/zoneminder/zoneminder.service')
-rw-r--r-- | pcr/zoneminder/zoneminder.service | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pcr/zoneminder/zoneminder.service b/pcr/zoneminder/zoneminder.service new file mode 100644 index 000000000..83d992aa7 --- /dev/null +++ b/pcr/zoneminder/zoneminder.service @@ -0,0 +1,18 @@ +# ZoneMinder systemd unit file +# This file is intended to work with all distributions with Systemd + +[Unit] +Description=ZoneMinder CCTV recording and security system +After=network.target mysqld.service httpd.service +Requires=mysqld.service httpd.service + +[Service] +User=http +Type=forking +ExecStart=/usr/bin/zmpkg.pl start +ExecReload=/usr/bin/zmpkg.pl restart +ExecStop=/bin/bash -c '[[ "$(/usr/bin/pgrep zmdc.pl)" > 0 ]] && /usr/bin/zmpkg.pl stop' +PIDFile="/run/zm/zm.pid" + +[Install] +WantedBy=multi-user.target |