diff options
author | Michael Hanson <hansonorders@verizon.net> | 2011-08-03 22:50:37 (GMT) |
---|---|---|
committer | Michael Hanson <hansonorders@verizon.net> | 2011-08-03 22:50:37 (GMT) |
commit | daf5a55912f10a1d4053e173f286eb2c59cea1dd (patch) | |
tree | 0f7f24b2c6b17c55abb972149b0b4c42ca8337f6 /abs/core/runit-scripts/runitscripts | |
parent | 7d8a4f93e15f61418ea89666b57063111700dc7e (diff) | |
download | linhes_pkgbuild-daf5a55912f10a1d4053e173f286eb2c59cea1dd.zip linhes_pkgbuild-daf5a55912f10a1d4053e173f286eb2c59cea1dd.tar.gz linhes_pkgbuild-daf5a55912f10a1d4053e173f286eb2c59cea1dd.tar.bz2 |
runit-scripts: Add mythexport
Diffstat (limited to 'abs/core/runit-scripts/runitscripts')
-rwxr-xr-x | abs/core/runit-scripts/runitscripts/services/mythexport/finish | 4 | ||||
-rwxr-xr-x | abs/core/runit-scripts/runitscripts/services/mythexport/run | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/abs/core/runit-scripts/runitscripts/services/mythexport/finish b/abs/core/runit-scripts/runitscripts/services/mythexport/finish new file mode 100755 index 0000000..b7fa7a6 --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/mythexport/finish @@ -0,0 +1,4 @@ +#!/bin/bash + +# runit only knows about the run script wrapper, so kill the daemon ourselves + kill `pidof -o %PPID -x /usr/bin/mythexport-daemon` >/dev/null 2>&1 diff --git a/abs/core/runit-scripts/runitscripts/services/mythexport/run b/abs/core/runit-scripts/runitscripts/services/mythexport/run new file mode 100755 index 0000000..45f77fd --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/mythexport/run @@ -0,0 +1,10 @@ +#!/bin/bash + +/sbin/chpst -u mythtv /usr/bin/mythexport-daemon + +PID=`pidof -o %PPID -x /usr/bin/mythexport-daemon` + +# Wait until daemon dies, else runit can't supervise us + while [ "`pidof -o %PPID -x /usr/bin/mythexport-daemon`" == "$PID" ]; do + sleep 2 + done |