diff options
author | Britney Fransen <brfransen@gmail.com> | 2014-03-07 16:54:04 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2014-03-07 16:54:04 (GMT) |
commit | d383e18985ab0d72bb9a5e046775a64f54920ba5 (patch) | |
tree | a980354b379d0bc42eab1561eb191937b0dca6a9 /abs/core/LinHES-system/linhes_update.sh | |
parent | 66ffc6371f3429a3778ce0f88953df7111f34ab6 (diff) | |
download | linhes_pkgbuild-d383e18985ab0d72bb9a5e046775a64f54920ba5.zip linhes_pkgbuild-d383e18985ab0d72bb9a5e046775a64f54920ba5.tar.gz linhes_pkgbuild-d383e18985ab0d72bb9a5e046775a64f54920ba5.tar.bz2 |
LinHES-system: linhes_update: check if started using mythfrontend-start just kill mythfrontend
mythfrontend-start is started from mythwelcome and if USR1 is used it ends mythfrontend-start which causes mythwelcome to accept remote commands and multiple mythfrontends will try to be started.
Diffstat (limited to 'abs/core/LinHES-system/linhes_update.sh')
-rw-r--r-- | abs/core/LinHES-system/linhes_update.sh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/abs/core/LinHES-system/linhes_update.sh b/abs/core/LinHES-system/linhes_update.sh index 21dfb6c..d563504 100644 --- a/abs/core/LinHES-system/linhes_update.sh +++ b/abs/core/LinHES-system/linhes_update.sh @@ -9,6 +9,17 @@ usage () { exit $1 } +restart_mfe () { + #check if started from mythfrontend-start and if so just kill mfe + #otherwise reload mfe + if [[ `pgrep -fx "/bin/bash /usr/LH/bin/mythfrontend-start"` ]] + then + killall mythfrontend + else + pkill -USR1 mythfrontend + fi +} + dsply () { if grep -q "Updates Available" /usr/share/mythtv/themes/defaultmenu/linhes.xml then @@ -16,9 +27,10 @@ dsply () { msg_client.py --clear --tag "checkUpdates" msg_client.py --kill msg_client.py --msg "Updates available!\nGo to the Service Menu to install the updates.|middle" + else + restart_mfe fi echo " Updates available!" - pkill -USR1 mythfrontend exit else [ "$1" = false ] && { msg_client.py --msg "Checking for updates...|middle" --timeout 600 --tag "checkUpdates"; } @@ -40,6 +52,8 @@ chck () { msg_client.py --clear --tag "checkUpdates" msg_client.py --kill msg_client.py --msg "No updates available.\nReturning to Main Menu.|middle" + else + restart_mfe fi echo " No updates available." else @@ -109,4 +123,4 @@ shift $(($OPTIND - 1)) dsply $SILENT chck $SILENT -pkill -USR1 mythfrontend +#pkill -USR1 mythfrontend |