summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--abs/core-testing/LinHES-system/PKGBUILD32
-rwxr-xr-xabs/core-testing/LinHES-system/mythfrontend-start22
2 files changed, 52 insertions, 2 deletions
diff --git a/abs/core-testing/LinHES-system/PKGBUILD b/abs/core-testing/LinHES-system/PKGBUILD
index e22c055..c76205a 100644
--- a/abs/core-testing/LinHES-system/PKGBUILD
+++ b/abs/core-testing/LinHES-system/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-system
pkgver=1.1
-pkgrel=22
+pkgrel=25
arch=('i686')
MVDIR=$startdir/pkg/usr/LH
BINDIR=$startdir/pkg/usr/bin
@@ -8,7 +8,7 @@ install=LinHES.install
pkgdesc="scripts and things related to having a automated system"
depends=(linhes-sounds xdotool)
backup=(etc/modprobe.d/alsa-base)
-binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh LinHES-run firstboot.sh load-modules-mythvantage.sh unclutter-toggle.sh myth_mtc.lr smolt.cron "
+binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh LinHES-run firstboot.sh load-modules-mythvantage.sh unclutter-toggle.sh myth_mtc.lr smolt.cron mythfrontend-start"
source=(LinHES-session LinHES-profile.sh $binfiles alsa-base)
@@ -54,3 +54,31 @@ md5sums=('19934a456d0e112298b8aac3279f9a16'
'f1870a9522c79e6b248fcbf81dec3280'
'abe887472a170bd1a8e6da6a7b7e93e4'
'eb879fee9603a05d5420d4ce8ed9e450')
+md5sums=('19934a456d0e112298b8aac3279f9a16'
+ '5881bdb43d578ec3a79d1f77ea58a3db'
+ 'a875ee97f86e46f34a741c2bc455f894'
+ 'cdcbc530224215f8fcf7ebcd93d7eb0b'
+ 'c60b6c66f498809a6e5ca18a8c97d336'
+ 'ccae1296ef248fa52ec3a7cb820a476e'
+ '7bae998ba458a7f74c51c7268e39b28d'
+ '18a884a73344ff6eb74f63b49745e0f5'
+ 'dc3eef2a624754e16805d72bbe488b67'
+ 'dc0be354ce77ba2b89868fc29b942c43'
+ 'f1870a9522c79e6b248fcbf81dec3280'
+ 'abe887472a170bd1a8e6da6a7b7e93e4'
+ '5bced1c7b92e6190835139494c5e9905'
+ 'eb879fee9603a05d5420d4ce8ed9e450')
+md5sums=('19934a456d0e112298b8aac3279f9a16'
+ '5881bdb43d578ec3a79d1f77ea58a3db'
+ 'a875ee97f86e46f34a741c2bc455f894'
+ 'cdcbc530224215f8fcf7ebcd93d7eb0b'
+ 'c60b6c66f498809a6e5ca18a8c97d336'
+ 'ccae1296ef248fa52ec3a7cb820a476e'
+ '7bae998ba458a7f74c51c7268e39b28d'
+ '18a884a73344ff6eb74f63b49745e0f5'
+ 'dc3eef2a624754e16805d72bbe488b67'
+ 'dc0be354ce77ba2b89868fc29b942c43'
+ 'f1870a9522c79e6b248fcbf81dec3280'
+ 'abe887472a170bd1a8e6da6a7b7e93e4'
+ '752488eb8bfb672ce0e4c924f7faf3d1'
+ 'eb879fee9603a05d5420d4ce8ed9e450')
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