2014-11-26 06:50:46 +08:00
|
|
|
# ZoneMinder systemd unit file
|
|
|
|
# This file is intended to work with debian distributions
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=ZoneMinder CCTV recording and security system
|
|
|
|
After=network.target mysql.service apache2.service
|
2014-12-08 01:48:11 +08:00
|
|
|
Requires=apache2.service
|
2014-12-08 23:57:37 +08:00
|
|
|
Wants=mysql.service
|
2014-11-26 06:50:46 +08:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
User=www-data
|
|
|
|
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=/var/run/zm/zm.pid
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|