summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-system/mythfrontend-start
diff options
context:
space:
mode:
authorMichael Hanson <hansonorders@verison.net>2010-03-26 21:57:39 (GMT)
committerMichael Hanson <hansonorders@verison.net>2010-03-26 21:57:39 (GMT)
commit2e4cdc292144c9803933545f1b86089e7ed36410 (patch)
tree350e7d92cebacfdc29daf7917d05b833e8ee6461 /abs/core-testing/LinHES-system/mythfrontend-start
parentb6e3f89934e70bbed2a7e1c550760fc9d356c821 (diff)
parentc7deae73bc996a769a143de71b5c4c7e4f439e6e (diff)
downloadlinhes_pkgbuild-2e4cdc292144c9803933545f1b86089e7ed36410.zip
linhes_pkgbuild-2e4cdc292144c9803933545f1b86089e7ed36410.tar.gz
linhes_pkgbuild-2e4cdc292144c9803933545f1b86089e7ed36410.tar.bz2
Merge branch 'master' of mihanson@knoppmyth.net:LinHES-PKGBUILD
Diffstat (limited to 'abs/core-testing/LinHES-system/mythfrontend-start')
-rwxr-xr-xabs/core-testing/LinHES-system/mythfrontend-start22
1 files changed, 22 insertions, 0 deletions
diff --git a/abs/core-testing/LinHES-system/mythfrontend-start b/abs/core-testing/LinHES-system/mythfrontend-start
new file mode 100755
index 0000000..c92d024
--- /dev/null
+++ b/abs/core-testing/LinHES-system/mythfrontend-start
@@ -0,0 +1,22 @@
+#!/bin/bash
+PIDS=$(pidof mythfrontend)
+P_array=( $PIDS )
+let "instances = ${#P_array[*]}" # Count elements.
+
+if [ $instances -gt 0 ];
+then
+ if [ $instances -eq 1 ]; then
+ diagtext="is already a MythFrontend"
+ else
+ diagtext="are already $instances MythFrontends"
+ fi
+
+ question="There $diagtext running. Do you really want to start another one?"
+ mythvantage -q "${question}"
+ if [ $? = 16 ]
+ then
+ mythfrontend --logfile /var/log/mythtv/mythfrontend.log
+ fi
+else
+ mythfrontend --logfile /var/log/mythtv/mythfrontend.log
+fi