summaryrefslogtreecommitdiff
path: root/pcr/zoneminder/zoneminder.service
blob: 83d992aa7cf6c3fb34ab0fc71bcd22916d81dddb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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