diff options
author | James Meyer <james.meyer@operamail.com> | 2012-01-26 02:23:03 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-01-26 02:23:54 (GMT) |
commit | 8dccaace9c7f36aa3513639b67a18c331548714b (patch) | |
tree | d182682165012ef48108d7b3358c26a00be86099 /abs | |
parent | 55b3626309830e1301dcd66e5755a8ab2b59a4a1 (diff) | |
download | linhes_pkgbuild-7.2.zip linhes_pkgbuild-7.2.tar.gz linhes_pkgbuild-7.2.tar.bz2 |
runit-scripts: add back mythdroid scripts by mihanson.7.2
Diffstat (limited to 'abs')
-rwxr-xr-x | abs/core/runit-scripts/PKGBUILD | 2 | ||||
-rwxr-xr-x | abs/core/runit-scripts/runitscripts/services/mythdroid/finish | 9 | ||||
-rwxr-xr-x | abs/core/runit-scripts/runitscripts/services/mythdroid/run | 16 |
3 files changed, 26 insertions, 1 deletions
diff --git a/abs/core/runit-scripts/PKGBUILD b/abs/core/runit-scripts/PKGBUILD index 877fe18..b58966d 100755 --- a/abs/core/runit-scripts/PKGBUILD +++ b/abs/core/runit-scripts/PKGBUILD @@ -1,6 +1,6 @@ pkgname=runit-scripts pkgver=2.1.1 -pkgrel=49 +pkgrel=50 pkgdesc="collection of startup scripts for runit" url="http://smarden.org/runit/" license="BSD" diff --git a/abs/core/runit-scripts/runitscripts/services/mythdroid/finish b/abs/core/runit-scripts/runitscripts/services/mythdroid/finish new file mode 100755 index 0000000..c3d8b6b --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/mythdroid/finish @@ -0,0 +1,9 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +[ -f /etc/conf.d/mdd.conf ] && . /etc/conf.d/mdd.conf + + PID=$(pidof -o %PPID -x /usr/bin/vendor_perl/mdd.pl) + [[ -n $PID ]] && kill $PID &> /dev/null diff --git a/abs/core/runit-scripts/runitscripts/services/mythdroid/run b/abs/core/runit-scripts/runitscripts/services/mythdroid/run new file mode 100755 index 0000000..fa2cb48 --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/mythdroid/run @@ -0,0 +1,16 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +[ -f /etc/conf.d/mdd.conf ] && . /etc/conf.d/mdd.conf + + stat_runit "Starting MythDroid daemon" + + /sbin/chpst -u mythtv /usr/bin/vendor_perl/mdd.pl + PID=$(pidof -o %PPID -x /usr/bin/vendor_perl/mdd.pl) + +# Wait until daemon dies, else runit can't supervise us + while [ "`pidof -o %PPID -x /usr/bin/vendor_perl/mdd.pl`" == "$PID" ]; do + sleep 2 + done |