summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts
diff options
context:
space:
mode:
authorCecil <knoppmyth@gmail.com>2011-08-06 19:10:30 (GMT)
committerCecil <knoppmyth@gmail.com>2011-08-06 19:10:30 (GMT)
commitad58e3033f6bb5137b8dcb0e7eca12d50d888402 (patch)
tree9321335a68173bc3e4c1d237c19c8880411fa676 /abs/core/runit-scripts/runitscripts
parent998faf16b1b62493b39aa13b3cb53dfac266ef4c (diff)
parent9709ca528ca5dfbdb6ec6ea283ac6670e8f33b9d (diff)
downloadlinhes_pkgbuild-ad58e3033f6bb5137b8dcb0e7eca12d50d888402.zip
linhes_pkgbuild-ad58e3033f6bb5137b8dcb0e7eca12d50d888402.tar.gz
linhes_pkgbuild-ad58e3033f6bb5137b8dcb0e7eca12d50d888402.tar.bz2
Merge branch 'testing' of ssh://cesman@linhes.org/mount/repository/linhes_pkgbuild into testing
Conflicts: abs/core/tzdata/PKGBUILD
Diffstat (limited to 'abs/core/runit-scripts/runitscripts')
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/lighttpd/run7
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mythexport/finish4
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mythexport/run10
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/smartd/run11
4 files changed, 23 insertions, 9 deletions
diff --git a/abs/core/runit-scripts/runitscripts/services/lighttpd/run b/abs/core/runit-scripts/runitscripts/services/lighttpd/run
index 798690c..f9c574d 100755
--- a/abs/core/runit-scripts/runitscripts/services/lighttpd/run
+++ b/abs/core/runit-scripts/runitscripts/services/lighttpd/run
@@ -4,5 +4,10 @@ export TERM=linux
. /etc/rc.d/functions
stat_runit "Starting lighttpd"
+if [ ! -d /var/run/lighttpd ] ; then
+ mkdir -p /var/run/lighttpd
+ chown http /var/run/lighttpd
+fi
-exec /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
+# Using -angel to start lighttpd allows lighttpd to accept signals
+exec /usr/sbin/lighttpd-angel -D -f /etc/lighttpd/lighttpd.conf
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
diff --git a/abs/core/runit-scripts/runitscripts/services/smartd/run b/abs/core/runit-scripts/runitscripts/services/smartd/run
index 15ed769..b8eafb6 100755
--- a/abs/core/runit-scripts/runitscripts/services/smartd/run
+++ b/abs/core/runit-scripts/runitscripts/services/smartd/run
@@ -3,11 +3,6 @@
. /etc/rc.conf
. /etc/rc.d/functions
- stat_runit "Starting smartd"
- /usr/sbin/smartd -n -c /etc/smartd.conf -q never &>/dev/null
- if [ $? -ne 0 ]; then
- stat_fail
- else
- add_daemon smartd
- stat_done
- fi
+stat_runit "Starting smartd"
+
+ exec /usr/sbin/smartd -n -c /etc/smartd.conf -q never &>/dev/null