summaryrefslogtreecommitdiff
path: root/pcr/zoneminder-libav/zoneminder
diff options
context:
space:
mode:
authorMárcio Alexandre Silva Delgado <coadde@lavabit.com>2012-11-05 01:09:53 -0200
committerMárcio Alexandre Silva Delgado <coadde@lavabit.com>2012-11-05 01:09:53 -0200
commit6f5597aa7308b8185b341c5dea4b303078a49425 (patch)
treed6ab3b1e05905c6aee0f39a8018555926e6cde40 /pcr/zoneminder-libav/zoneminder
parent80a190a9f2a31cb5be75dd3564fb212758511218 (diff)
downloadabslibre-6f5597aa7308b8185b341c5dea4b303078a49425.tar.gz
abslibre-6f5597aa7308b8185b341c5dea4b303078a49425.tar.bz2
abslibre-6f5597aa7308b8185b341c5dea4b303078a49425.zip
zoneminder-libav: add package to pcr repo
Diffstat (limited to 'pcr/zoneminder-libav/zoneminder')
-rw-r--r--pcr/zoneminder-libav/zoneminder63
1 files changed, 63 insertions, 0 deletions
diff --git a/pcr/zoneminder-libav/zoneminder b/pcr/zoneminder-libav/zoneminder
new file mode 100644
index 000000000..c4cbf4d3f
--- /dev/null
+++ b/pcr/zoneminder-libav/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