Merge pull request #146 from buanet/dev

prepare new stable
This commit is contained in:
Andre Germann
2020-11-05 21:23:01 +01:00
committed by GitHub
2 changed files with 10 additions and 4 deletions

View File

@@ -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 ' '

View File

@@ -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 ' '