summaryrefslogtreecommitdiffstats
path: root/abs/core/zoneminder/run
diff options
context:
space:
mode:
authorCecil <knoppmyth@gmail.com>2011-09-24 07:20:54 (GMT)
committerCecil <knoppmyth@gmail.com>2011-09-24 07:20:54 (GMT)
commite536287c3be71facd87152fce7d52a2b29c0ecf9 (patch)
tree660ba74b0e76f09572224b3dde9a1bb9f49291bb /abs/core/zoneminder/run
parentf514b16b0faa7487af9b6e3fecc5b1c8b0955b6e (diff)
parent848229e1de18d7bb2893e6cd78f71f315935685c (diff)
downloadlinhes_pkgbuild-e536287c3be71facd87152fce7d52a2b29c0ecf9.zip
linhes_pkgbuild-e536287c3be71facd87152fce7d52a2b29c0ecf9.tar.gz
linhes_pkgbuild-e536287c3be71facd87152fce7d52a2b29c0ecf9.tar.bz2
Merge branch 'testing' of ssh://cesman@linhes.org/mount/repository/linhes_pkgbuild into testing
Diffstat (limited to 'abs/core/zoneminder/run')
-rwxr-xr-xabs/core/zoneminder/run19
1 files changed, 17 insertions, 2 deletions
diff --git a/abs/core/zoneminder/run b/abs/core/zoneminder/run
index e458bc8..ce61c24 100755
--- a/abs/core/zoneminder/run
+++ b/abs/core/zoneminder/run
@@ -2,5 +2,20 @@
export TERM=linux
. /etc/rc.conf
. /etc/rc.d/functions
-stat_runit "Starting ZoneMinder"
-exec /etc/rc.d/zm start
+
+while true ; do
+ PID=`pidof -x zmdc.pl`
+ if test -n "$PID" ; then
+ sleep 60
+ continue
+ fi
+ stat_runit "Starting ZoneMinder"
+ /etc/rc.d/zm start
+ if test $? -ne 0 ; then
+ stat_fail
+ else
+ add_daemon zm
+ stat_done
+ fi
+ sleep 30
+done