diff options
author | Britney Fransen <brfransen@gmail.com> | 2012-12-08 21:37:33 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-12-11 19:49:09 (GMT) |
commit | 6c0027e31a9509aea391c45385221373250506cf (patch) | |
tree | ac696233af7ea497245dbeae936a0208a1b60a94 /abs/core/LinHES-system/bin/mythbackup | |
parent | 41d450c89b1c67c037c7f6fc1e91cfb4072c4c95 (diff) | |
download | linhes_pkgbuild-6c0027e31a9509aea391c45385221373250506cf.zip linhes_pkgbuild-6c0027e31a9509aea391c45385221373250506cf.tar.gz linhes_pkgbuild-6c0027e31a9509aea391c45385221373250506cf.tar.bz2 |
LinHES-system: cherry picked mythbackup: check if mythwelcome or mythfrontend are running.
refs #875
Diffstat (limited to 'abs/core/LinHES-system/bin/mythbackup')
-rwxr-xr-x | abs/core/LinHES-system/bin/mythbackup | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/abs/core/LinHES-system/bin/mythbackup b/abs/core/LinHES-system/bin/mythbackup index 3b4edd4..905beeb 100755 --- a/abs/core/LinHES-system/bin/mythbackup +++ b/abs/core/LinHES-system/bin/mythbackup @@ -46,6 +46,20 @@ echo "Starting rollover of old backups, this may take a while..." backup_roller .19 .18 .17 .16 .15 .14 .13 .12 .11 .10 .9 .8 .7 .6 .5 .4 .3 .2 .1 '' echo "Rollover completed." +# Quit MythWelcome and MythFrontend if they are running. +MWRUNNING=0 +FERUNNING=0 +if [ "$(pidof mythwelcome)" ] +then + MWRUNNING=1 + killall mythwelcome +fi +if [ "$(pidof mythfrontend)" ] +then + FERUNNING=1 + killall mythfrontend +fi + osd "Checking the database..." 0 2 # Start with the database backup, first we make sure it's healthy, and # then we can dump it. @@ -110,4 +124,13 @@ start_mythbackend # Unlock the system again... unlock_myth +# Restart Mythwelcome or Mythfrontend if it was running. +if [ $MWRUNNING -eq 1 ] +then + exec su mythtv -c "/usr/bin/mythwelcome" > /dev/null 2>&1 +elif [ $FERUNNING -eq 1 ] +then + exec su mythtv -c "/usr/LH/bin/mythfrontend-start" > /dev/null 2>&1 +fi + exit $STATUS |