summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSimon Rettberg2015-09-30 11:31:10 +0200
committerSimon Rettberg2015-09-30 11:31:10 +0200
commit2b14b52d8f726dac0ecc61d8910c0b10439be065 (patch)
treed2e34631af0d44890ed3cbd9620fc411bd826b06 /scripts
parent[Https] Increase timeouts, use systemctl fort restart (diff)
downloadtmlite-bwlp-2b14b52d8f726dac0ecc61d8910c0b10439be065.tar.gz
tmlite-bwlp-2b14b52d8f726dac0ecc61d8910c0b10439be065.tar.xz
tmlite-bwlp-2b14b52d8f726dac0ecc61d8910c0b10439be065.zip
[system-restore] Only restore dozmod config from old configuration if told to do so
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/system-restore8
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