summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-system/mythfrontend-start
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-03-26 17:27:53 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-03-26 17:27:53 (GMT)
commit4787fdbecc9971b518322f705436e08bfef0f297 (patch)
tree2c5f3f4c1bda3fa79f85479b6e4e3307cf9773e7 /abs/core-testing/LinHES-system/mythfrontend-start
parent67d597ee8ca712c9708d00de85add802ec35c09d (diff)
downloadlinhes_pkgbuild-4787fdbecc9971b518322f705436e08bfef0f297.zip
linhes_pkgbuild-4787fdbecc9971b518322f705436e08bfef0f297.tar.gz
linhes_pkgbuild-4787fdbecc9971b518322f705436e08bfef0f297.tar.bz2
linhes-system: add script mythfrontend-start
This is a slightly modified version from the one provided in the ticket. This version will call mythvantage -q "$question" and depending on the answer will either start a new mfe or quit. closes #389
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