diff options
Diffstat (limited to 'abs/core/runit-scripts/runitscripts/services/zoneminder/run')
-rwxr-xr-x | abs/core/runit-scripts/runitscripts/services/zoneminder/run | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/abs/core/runit-scripts/runitscripts/services/zoneminder/run b/abs/core/runit-scripts/runitscripts/services/zoneminder/run new file mode 100755 index 0000000..dfd15f3 --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/zoneminder/run @@ -0,0 +1,28 @@ +#!/bin/bash +exec 2>&1 + +export TERM=linux +MYTH_RUN_STATUS="1" +. /etc/rc.conf +. /etc/rc.d/functions +#wait for mysql +/sbin/svwaitup -s 20 /service/mysql + +stat_runit "Starting ZoneMinder" +/usr/bin/zmpkg.pl start 2>/tmp/zoneminder.out +rc=$? +if [ $rc = 0 ] +then + PID=`pidof -x zmdc.pl` + while [[ -d /proc/$PID ]] + do + sleep 45 + done +else + stat_runit "Zoneminder did not start correctly" +fi + + + + + |