summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/runit-scripts/runitscripts/services/evrouter
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2008-12-05 19:17:48 (GMT)
committerJames Meyer <james.meyer@operamail.com>2008-12-05 19:17:48 (GMT)
commit0cc1080dee0c081423deffca0884193011ea399b (patch)
tree138395cfe31c980d90211f692b77bda25fecdbd3 /abs/core-testing/runit-scripts/runitscripts/services/evrouter
parent9c63001e5eb322bf73aed1541884027f422ff480 (diff)
downloadlinhes_pkgbuild-0cc1080dee0c081423deffca0884193011ea399b.zip
linhes_pkgbuild-0cc1080dee0c081423deffca0884193011ea399b.tar.gz
linhes_pkgbuild-0cc1080dee0c081423deffca0884193011ea399b.tar.bz2
add better error checking for the init scripts ncidd/xvfb/evrouter
Diffstat (limited to 'abs/core-testing/runit-scripts/runitscripts/services/evrouter')
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/services/evrouter/finish10
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/services/evrouter/run12
2 files changed, 18 insertions, 4 deletions
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/evrouter/finish b/abs/core-testing/runit-scripts/runitscripts/services/evrouter/finish
index 0dd33de..5ebda4c 100755
--- a/abs/core-testing/runit-scripts/runitscripts/services/evrouter/finish
+++ b/abs/core-testing/runit-scripts/runitscripts/services/evrouter/finish
@@ -1,4 +1,10 @@
#!/bin/bash
. /etc/profile
-DISPLAY=localhost:50 evrouter -q
-rm -rf /tmp/.evrouter*
+which evrouter >/dev/null 2>/dev/null
+if [ $? = 0 ]
+then
+ DISPLAY=localhost:50 evrouter -q
+ rm -rf /tmp/.evrouter*
+else
+ sv down evrouter
+fi \ No newline at end of file
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/evrouter/run b/abs/core-testing/runit-scripts/runitscripts/services/evrouter/run
index 1d7389a..5697f6f 100755
--- a/abs/core-testing/runit-scripts/runitscripts/services/evrouter/run
+++ b/abs/core-testing/runit-scripts/runitscripts/services/evrouter/run
@@ -1,5 +1,13 @@
#!/bin/bash
. /etc/profile
-sv start Xvfb
-su mythtv -c "DISPLAY=localhost:50 evrouter -c /etc/evrouter.cfg -f /dev/input/event*"
+which evrouter >/dev/null 2>/dev/null
+if [ $? = 0 ]
+then
+ ps -ef |grep -v grep|grep -q "Xvfb :50"
+ if [ ! $? = 0 ]
+ then
+ sv start Xvfb
+ fi
+ su mythtv -c "DISPLAY=localhost:50 evrouter -c /etc/evrouter.cfg -f /dev/input/event*"
+fi