diff options
Diffstat (limited to 'scripts/system-restore')
-rwxr-xr-x | scripts/system-restore | 5 |
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=$? |