summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts/services/mythexport/run
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/runit-scripts/runitscripts/services/mythexport/run')
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mythexport/run10
1 files changed, 10 insertions, 0 deletions
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