diff options
Diffstat (limited to 'scripts/system-restore')
-rwxr-xr-x | scripts/system-restore | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/system-restore b/scripts/system-restore index b9fe9d0..21e7d05 100755 --- a/scripts/system-restore +++ b/scripts/system-restore @@ -85,8 +85,12 @@ if [ $DB_OLD -eq 1 ]; then # Restoring from dozmod v1.0 db mysql --defaults-extra-file=/etc/mysql/debian.cnf --default-character-set=utf8 < db.sql RET=$? - echo "--- Trying to convert dozmod data (this might not work too well...)" - mysql --defaults-extra-file=/etc/mysql/debian.cnf --default-character-set=utf8 < "${TMDIR}/data/dozmod-upgrade.sql" + if [ $RES_SAT -eq 1 ]; then + echo "--- Trying to convert dozmod data (this might not work too well...)" + mysql --defaults-extra-file=/etc/mysql/debian.cnf --default-character-set=utf8 < "${TMDIR}/data/dozmod-upgrade.sql" + else + echo "DROP DATABASE bwLehrpool" | mysql --defaults-extra-file=/etc/mysql/debian.cnf --default-character-set=utf8 + fi else # Restoring from v1.1+ db RET=0 |