diff options
author | Cecil <knoppmyth@gmail.com> | 2011-09-24 07:20:54 (GMT) |
---|---|---|
committer | Cecil <knoppmyth@gmail.com> | 2011-09-24 07:20:54 (GMT) |
commit | e536287c3be71facd87152fce7d52a2b29c0ecf9 (patch) | |
tree | 660ba74b0e76f09572224b3dde9a1bb9f49291bb /abs/core/zoneminder/run | |
parent | f514b16b0faa7487af9b6e3fecc5b1c8b0955b6e (diff) | |
parent | 848229e1de18d7bb2893e6cd78f71f315935685c (diff) | |
download | linhes_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-x | abs/core/zoneminder/run | 19 |
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 |