diff options
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 |