Code: Select all
#!/sbin/runscript
# Gentoo init script for ZoneMinder
# securiteaze@gmail.com
depend() {
need apache2
need mysql
need net
use logger
}
start() {
ebegin "Starting ZoneMinder"
start-stop-daemon --start --quiet --pidfile /var/run/zm.pid --make-pidfile --exec /usr/bin/zmpkg.pl -- start
eend $?
}
stop() {
ebegin "Stopping ZoneMinder"
start-stop-daemon --start --quiet --exec /usr/bin/zmpkg.pl -- stop &&
rm /var/run/zm.pid &&
eend 0 ||
eend 1
}