diff options
author | Márcio Alexandre Silva Delgado <coadde@lavabit.com> | 2012-11-04 00:29:41 -0200 |
---|---|---|
committer | Márcio Alexandre Silva Delgado <coadde@lavabit.com> | 2012-11-04 00:29:41 -0200 |
commit | 7680dd73c24ff94ee2b4bf477037ebc5f957495c (patch) | |
tree | 005dcdaf3253820d161fe0b3a64c37af240ffe38 /pcr/zoneminder-lts/zoneminder | |
parent | f04b38505e16df19b6f29a51051729359b7f49af (diff) |
zoneminder: add pkg to pcr repo
Diffstat (limited to 'pcr/zoneminder-lts/zoneminder')
-rw-r--r-- | pcr/zoneminder-lts/zoneminder | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/pcr/zoneminder-lts/zoneminder b/pcr/zoneminder-lts/zoneminder new file mode 100644 index 000000000..c4cbf4d3f --- /dev/null +++ b/pcr/zoneminder-lts/zoneminder @@ -0,0 +1,63 @@ +#!/bin/bash + +daemon_name=zm + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Starting Zoneminder" + /usr/bin/zmfix -a + if /usr/bin/zmpkg.pl start >/dev/null ; then + add_daemon $daemon_name + stat_done + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping Zoneminder" + if /usr/bin/zmpkg.pl stop >/dev/null ; then + rm_daemon $daemon_name + stat_done + else + stat_fail + exit 1 + fi + ;; + + reload) + stat_busy "Reloading Zoneminder" + if /usr/bin/zmpkg.pl graceful >/dev/null ; then + add_daemon $daemon_name + stat_done + else + stat_fail + exit 1 + fi + ;; + + restart) + stat_busy "Restarting Zoneminder" + if /usr/bin/zmpkg.pl restart >/dev/null ; then + add_daemon $daemon_name + stat_done + else + stat_fail + exit 1 + fi + ;; + + status) + stat_busy "Checking Zoneminder status"; + ck_status $daemon_name + ;; + + *) + echo "usage: $0 {start|stop|reload|restart|status}" +esac + +exit 0 |