summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/runit-scripts/runitscripts/services/ncid
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/ncid
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/ncid')
-rw-r--r--abs/core-testing/runit-scripts/runitscripts/services/ncid/finish9
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/services/ncid/run11
2 files changed, 18 insertions, 2 deletions
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/ncid/finish b/abs/core-testing/runit-scripts/runitscripts/services/ncid/finish
new file mode 100644
index 0000000..953a4a1
--- /dev/null
+++ b/abs/core-testing/runit-scripts/runitscripts/services/ncid/finish
@@ -0,0 +1,9 @@
+#!/bin/bash
+exec 2>&1
+which ncid 2>/dev/null >/dev/null
+if [ ! $? = 0 ]
+then
+ sv down ncid
+fi
+
+
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/ncid/run b/abs/core-testing/runit-scripts/runitscripts/services/ncid/run
index 8a90707..7dbc8ba 100755
--- a/abs/core-testing/runit-scripts/runitscripts/services/ncid/run
+++ b/abs/core-testing/runit-scripts/runitscripts/services/ncid/run
@@ -1,5 +1,12 @@
#!/bin/sh
exec 2>&1
-sv start ncidd
-exec /usr/bin/ncid --no-gui --all --call-prog --program /usr/bin/ncid.py 127.0.0.1 3333
+which ncid 2>/dev/null >/dev/null
+if [ $? = 0 ]
+then
+ if [ -f /var/service/ncidd/run ]
+ then
+ sv start ncidd
+ fi
+ exec /usr/bin/ncid --no-gui --all --call-prog --program /usr/bin/ncid.py 127.0.0.1 3333
+fi