diff options
Diffstat (limited to 'abs/core-testing/LinHES-config/install_proxy.sh')
-rwxr-xr-x | abs/core-testing/LinHES-config/install_proxy.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/abs/core-testing/LinHES-config/install_proxy.sh b/abs/core-testing/LinHES-config/install_proxy.sh index ae3f316..113a3ee 100755 --- a/abs/core-testing/LinHES-config/install_proxy.sh +++ b/abs/core-testing/LinHES-config/install_proxy.sh @@ -270,7 +270,21 @@ function upgrade () { #wrap this in a network check_network, no need to update the db if the import worked. ##### do I need to start mysql? /etc/rc.d/mysqld stop - chroot "$mountpoint" "$MV_ROOT/bin/restore_km_db_chroot.sh" > /tmp/chrootdb_km.out + if [ -f /myth/backup/mythconverg.sql.gz ] + then + echo "--------------------------------" + echo "Restoring database" + echo "--------------------------------" + chroot "$mountpoint" "$MV_ROOT/bin/restore_km_db_chroot.sh" > /tmp/chrootdb_km.out + else + echo "--------------------------------" + echo "Couldn't find backup file, installing new database" + echo "--------------------------------" + touch /tmp/.upgrade_db_failed + chroot "$mountpoint" "$MV_ROOT/bin/install_db_chroot.sh" > /tmp/chrootdb.out + fi + + if [ -f /tmp/etc/KnoppMyth-version ] then chroot "$mountpoint" $MV_ROOT/bin/restore_default_settings.sh -c restore -t hostsettings |