Skip to content

Commit

Permalink
Merge pull request #146 from buanet/dev
Browse files Browse the repository at this point in the history
prepare new stable
  • Loading branch information
buanet authored Nov 5, 2020
2 parents 045f3b7 + e12da80 commit f39ad95
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions aarch64/scripts/iobroker_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ if [ "$zwave" != "" ]; then echo -n "----- " && echo -n "$(printf
echo "$(printf -- '-%.0s' {1..60})"
echo ' '


#####
# STEP 1 - Preparing container
#####
Expand Down Expand Up @@ -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" ]
Expand All @@ -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 ' '
Expand Down
7 changes: 5 additions & 2 deletions armv7hf/scripts/iobroker_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ if [ "$zwave" != "" ]; then echo -n "----- " && echo -n "$(printf
echo "$(printf -- '-%.0s' {1..60})"
echo ' '


#####
# STEP 1 - Preparing container
#####
Expand Down Expand Up @@ -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" ]
Expand All @@ -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 ' '
Expand Down

0 comments on commit f39ad95

Please sign in to comment.