summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts/services/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/runit-scripts/runitscripts/services/frontend')
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/frontend/finish28
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/frontend/log/run5
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/frontend/run21
3 files changed, 54 insertions, 0 deletions
diff --git a/abs/core/runit-scripts/runitscripts/services/frontend/finish b/abs/core/runit-scripts/runitscripts/services/frontend/finish
new file mode 100755
index 0000000..5b0bd5b
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/frontend/finish
@@ -0,0 +1,28 @@
+#!/bin/bash
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+grep -q nox /proc/cmdline
+STATUS=$?
+ if [ $STATUS = 0 ]
+ then
+ chvt 2
+else
+ if [ ! -d /etc/sv/frontend/.runtime ]
+ then
+ mkdir -p /etc/sv/frontend/.runtime
+ fi
+ touch /etc/sv/frontend/.runtime/`date +%s`
+ sleep 0.2
+ ps -U mythtv -ef |grep "/bin/sh /usr/bin/startx"|grep -v grep|awk ' { print $2 } '|xargs kill -9 2> /dev/null
+ cdate=`date`
+ numfiles=`/usr/bin/file_time_offset.py -s10 -d/etc/sv/frontend/.runtime`
+ if [ $numfiles -gt 2 ]
+ then
+ sv stop frontend
+ rm -f /etc/sv/frontend/.runtime/*
+ printhl " Frontend is not able to start, disabling it."
+ fi
+fi
diff --git a/abs/core/runit-scripts/runitscripts/services/frontend/log/run b/abs/core/runit-scripts/runitscripts/services/frontend/log/run
new file mode 100755
index 0000000..463045f
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/frontend/log/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+exec 2>&1
+. /etc/systemconfig
+ /usr/bin/logger -p local6.info -t mythfrontend
+
diff --git a/abs/core/runit-scripts/runitscripts/services/frontend/run b/abs/core/runit-scripts/runitscripts/services/frontend/run
new file mode 100755
index 0000000..c1e2f2d
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/frontend/run
@@ -0,0 +1,21 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+exec 2>&1
+ grep -qi nox /proc/cmdline
+ STATUS=$?
+ if [ $STATUS = 0 ]
+ then
+ sv down frontend
+ exit 0
+ fi
+touch /var/log/fluxbox.log
+chown mythtv:mythtv /var/log/fluxbox.log
+
+stat_runit "Starting LinHES frontend"
+
+#echo "Starting LinHES frontend" >/dev/tty1
+exec /bin/su - mythtv -l -c /usr/LH/bin/LinHES-start
+