summaryrefslogtreecommitdiffstats
path: root/abs/core
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2012-12-08 21:37:33 (GMT)
committerBritney Fransen <brfransen@gmail.com>2012-12-08 21:37:33 (GMT)
commitc1816a6385b492d3547500d78bbca3dca9eb3bce (patch)
treeb52b5f7775b582a2a36a8b2018c53dcb03f7e987 /abs/core
parent7aa20ff616a737e55a13277c4ab92e7d2cd5168f (diff)
downloadlinhes_pkgbuild-c1816a6385b492d3547500d78bbca3dca9eb3bce.zip
linhes_pkgbuild-c1816a6385b492d3547500d78bbca3dca9eb3bce.tar.gz
linhes_pkgbuild-c1816a6385b492d3547500d78bbca3dca9eb3bce.tar.bz2
LinHES-system: mythbackup: check if mythwelcome or mythfrontend are running. closes #875
Diffstat (limited to 'abs/core')
-rw-r--r--abs/core/LinHES-system/PKGBUILD2
-rw-r--r--abs/core/LinHES-system/bin/backupcommon2
-rwxr-xr-xabs/core/LinHES-system/bin/mythbackup23
3 files changed, 25 insertions, 2 deletions
diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD
index 3a82b87..f5f11b7 100644
--- a/abs/core/LinHES-system/PKGBUILD
+++ b/abs/core/LinHES-system/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-system
pkgver=2
-pkgrel=62
+pkgrel=63
arch=('i686')
MVDIR=$startdir/pkg/usr/LH
BINDIR=$startdir/pkg/usr/bin
diff --git a/abs/core/LinHES-system/bin/backupcommon b/abs/core/LinHES-system/bin/backupcommon
index d112341..4305509 100644
--- a/abs/core/LinHES-system/bin/backupcommon
+++ b/abs/core/LinHES-system/bin/backupcommon
@@ -99,7 +99,7 @@ require file+r+x $AWK $BASH $BUNZIP2 $BZIP2 $CAT $CHMOD $CHOWN $EGREP $GREP \
require dir+r+w+x /tmp "$BACKUP_DIR" "$DATABASE_DIR"
play_sound () {
- ($PLAYER $SILENCE $SOUNDS/$1 >& /dev/null)&
+ ($PLAYER $SILENCE $SILENCE $SOUNDS/$1 >& /dev/null)&
}
# Filter against an exclude list like the black list or the ignore list above
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