diff --git a/aarch64/scripts/iobroker_startup.sh b/aarch64/scripts/iobroker_startup.sh index f9d281f..ff23abd 100644 --- a/aarch64/scripts/iobroker_startup.sh +++ b/aarch64/scripts/iobroker_startup.sh @@ -63,7 +63,6 @@ if [ "$zwave" != "" ]; then echo -n "----- " && echo -n "$(printf echo "$(printf -- '-%.0s' {1..60})" echo ' ' - ##### # STEP 1 - Preparing container ##### @@ -125,6 +124,7 @@ then elif [ -f /opt/iobroker/iobroker ] then echo "Existing installation of ioBroker detected in /opt/iobroker." + rm -f /opt/scripts/.docker_config/.install_host elif [ $(ls *_backupiobroker.tar.gz 2> /dev/null | wc -l) != "0" ] && [ $(tar -ztvf /opt/iobroker/*_backupiobroker.tar.gz "backup/backup.json" 2> /dev/null | wc -l) != "0" ] then if [ "$multihost" = "slave" ] @@ -134,11 +134,14 @@ then echo "For more information see readme.md on Github (https://github.com/buanet/docker-iobroker)." exit 1 else - echo "IoBroker backup file detected in /opt/iobroker. Restoring ioBroker..." + echo "IoBroker backup file detected in /opt/iobroker. Preparing restore..." mv /opt/iobroker/*.tar.gz /opt/ tar -xf /opt/initial_iobroker.tar -C / mkdir /opt/iobroker/backups mv /opt/*.tar.gz /opt/iobroker/backups/ + chown -R $setuid:$setgid /opt/iobroker # fixes permission error during restore + echo "Done." + echo "Restoring ioBroker..." iobroker restore 0 > /opt/iobroker/log/restore.log 2>&1 echo "Done." echo ' ' diff --git a/armv7hf/scripts/iobroker_startup.sh b/armv7hf/scripts/iobroker_startup.sh index f9d281f..ff23abd 100644 --- a/armv7hf/scripts/iobroker_startup.sh +++ b/armv7hf/scripts/iobroker_startup.sh @@ -63,7 +63,6 @@ if [ "$zwave" != "" ]; then echo -n "----- " && echo -n "$(printf echo "$(printf -- '-%.0s' {1..60})" echo ' ' - ##### # STEP 1 - Preparing container ##### @@ -125,6 +124,7 @@ then elif [ -f /opt/iobroker/iobroker ] then echo "Existing installation of ioBroker detected in /opt/iobroker." + rm -f /opt/scripts/.docker_config/.install_host elif [ $(ls *_backupiobroker.tar.gz 2> /dev/null | wc -l) != "0" ] && [ $(tar -ztvf /opt/iobroker/*_backupiobroker.tar.gz "backup/backup.json" 2> /dev/null | wc -l) != "0" ] then if [ "$multihost" = "slave" ] @@ -134,11 +134,14 @@ then echo "For more information see readme.md on Github (https://github.com/buanet/docker-iobroker)." exit 1 else - echo "IoBroker backup file detected in /opt/iobroker. Restoring ioBroker..." + echo "IoBroker backup file detected in /opt/iobroker. Preparing restore..." mv /opt/iobroker/*.tar.gz /opt/ tar -xf /opt/initial_iobroker.tar -C / mkdir /opt/iobroker/backups mv /opt/*.tar.gz /opt/iobroker/backups/ + chown -R $setuid:$setgid /opt/iobroker # fixes permission error during restore + echo "Done." + echo "Restoring ioBroker..." iobroker restore 0 > /opt/iobroker/log/restore.log 2>&1 echo "Done." echo ' '