summaryrefslogtreecommitdiffstats
path: root/scripts/system-restore
diff options
context:
space:
mode:
authorSimon Rettberg2015-01-23 19:19:58 +0100
committerSimon Rettberg2015-01-23 19:19:58 +0100
commit2eb5cea8578c2884c6f30fa379212bbfc1554bed (patch)
tree12d4eb781782e07e41b084444a2185a978e90c98 /scripts/system-restore
parentPimp my boot menu (diff)
downloadtmlite-bwlp-2eb5cea8578c2884c6f30fa379212bbfc1554bed.tar.gz
tmlite-bwlp-2eb5cea8578c2884c6f30fa379212bbfc1554bed.tar.xz
tmlite-bwlp-2eb5cea8578c2884c6f30fa379212bbfc1554bed.zip
Stuff
Diffstat (limited to 'scripts/system-restore')
-rwxr-xr-xscripts/system-restore5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/system-restore b/scripts/system-restore
index a95a185..5d77dda 100755
--- a/scripts/system-restore
+++ b/scripts/system-restore
@@ -45,7 +45,12 @@ if [ $RET -ne 0 ]; then
echo "Error: Restoring database contents failed with exit code $RET"
exit 1
fi
+# Since we came that far we'll delete some old configs (if existent)
+rm -rf /opt/ldadp/{configs,pid,logs}/* /opt/openslx/configs/* /srv/openslx/www/boot/default/config.tgz 2> /dev/null
+# Force triggering IP detection/setting, which should in turn regenerate ldadp configs and launch ldadp instances if applicable
echo "UPDATE openslx.property SET value = 'invalid' WHERE name = 'server-ip' LIMIT 1" | mysql --defaults-extra-file=/etc/mysql/debian.cnf --default-character-set=utf8
+# Try to update the db (if required)
+curl -s 'http://localhost/slx-admin/api.php?do=update'
tar --ignore-failed-read -x -f files.tgz -C /
RET=$?