summaryrefslogtreecommitdiffstats
path: root/abs/core/zoneminder
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2011-09-20 23:42:12 (GMT)
committerBritney Fransen <brfransen@gmail.com>2011-09-20 23:42:12 (GMT)
commitad5be4387035eec47c68c03169c82a5fa780d0c4 (patch)
tree5dc25cf52d55d8194f2514ac0be6c373fde6e2d8 /abs/core/zoneminder
parent05bf1ffe6a564d12266613616133517e9e9e972f (diff)
downloadlinhes_pkgbuild-ad5be4387035eec47c68c03169c82a5fa780d0c4.zip
linhes_pkgbuild-ad5be4387035eec47c68c03169c82a5fa780d0c4.tar.gz
linhes_pkgbuild-ad5be4387035eec47c68c03169c82a5fa780d0c4.tar.bz2
zoneminder: update for runit. refs #770 closes #751
Diffstat (limited to 'abs/core/zoneminder')
-rwxr-xr-xabs/core/zoneminder/PKGBUILD28
-rwxr-xr-xabs/core/zoneminder/run19
2 files changed, 33 insertions, 14 deletions
diff --git a/abs/core/zoneminder/PKGBUILD b/abs/core/zoneminder/PKGBUILD
index f9d6f8f..00ac2c6 100755
--- a/abs/core/zoneminder/PKGBUILD
+++ b/abs/core/zoneminder/PKGBUILD
@@ -19,17 +19,8 @@ customdb
httpd-zm.conf
zmfilter.pl
zmeventbackup
-Makefile.patch)
-md5sums=('eaefa14befd482154970541252aa1a39'
- 'b20fb25b187eb6abb21321e153a7fb25'
- '5033bc098bf497c8aed1fc1b3c9c5f9c'
- 'f9720872736f26d17bc49d8725b75ae4'
- '4ace13d1e20934abe192ef7372c75988'
- '00201eba9c0a5d1ed14b10cc55410698'
- '80c52cc3575073a7462ff6a54886a345'
- '8b40137b6ff54f2fb26104b70edd22e9'
- 'bb308c2393e947a224d56862c85a3ad9')
-
+Makefile.patch
+run)
build() {
cd "$srcdir/ZoneMinder-$pkgver"
@@ -69,6 +60,10 @@ build() {
mkdir -p $startdir/pkg/var/run/zm
+ #install runit files
+ mkdir -p $pkgdir/etc/sv/zm
+ install -D -m 755 $srcdir/run $pkgdir/etc/sv/zm
+
### remove special files
find $startdir/pkg/ -name "perllocal.pod" \
-o -name ".packlist" \
@@ -77,4 +72,13 @@ build() {
}
-# vim:set ts=2 sw=2 et:
+md5sums=('eaefa14befd482154970541252aa1a39'
+ 'b20fb25b187eb6abb21321e153a7fb25'
+ '5033bc098bf497c8aed1fc1b3c9c5f9c'
+ 'f9720872736f26d17bc49d8725b75ae4'
+ '4ace13d1e20934abe192ef7372c75988'
+ '00201eba9c0a5d1ed14b10cc55410698'
+ '80c52cc3575073a7462ff6a54886a345'
+ '8b40137b6ff54f2fb26104b70edd22e9'
+ 'bb308c2393e947a224d56862c85a3ad9'
+ '0c7024c355ce36828627bed10d965202')
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