mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-21 12:19:10 +02:00
fixing iobroker unsetup
This commit is contained in:
18
debian/scripts/iobroker_startup.sh
vendored
18
debian/scripts/iobroker_startup.sh
vendored
@@ -129,10 +129,11 @@ echo ' '
|
||||
|
||||
if [ `find /opt/iobroker -type f | wc -l` -lt 1 ]
|
||||
then
|
||||
echo "There is no data detected in /opt/iobroker. Restoring initial ioBroker installation..."
|
||||
echo "There is no data detected in /opt/iobroker."
|
||||
echo "Restoring initial ioBroker installation..."
|
||||
tar -xf /opt/initial_iobroker.tar -C /
|
||||
# Removing UUID generated on docker image build
|
||||
iobroker unsetup
|
||||
bash iobroker unsetup -y
|
||||
echo "Done."
|
||||
elif [ -f /opt/iobroker/iobroker ]
|
||||
then
|
||||
@@ -147,15 +148,22 @@ then
|
||||
echo "For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker)."
|
||||
exit 1
|
||||
else
|
||||
echo "IoBroker backup file detected in /opt/iobroker. Preparing restore..."
|
||||
echo "IoBroker backup file detected in /opt/iobroker."
|
||||
echo "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
|
||||
# fixing permission errors during restore
|
||||
chown -R $setuid:$setgid /opt/iobroker
|
||||
echo "Done."
|
||||
echo "Restoring ioBroker..."
|
||||
iobroker restore 0 > /opt/iobroker/log/restore.log 2>&1
|
||||
bash iobroker restore 0 > /opt/iobroker/log/restore.log 2>&1
|
||||
# fixing hostname issues when restoring on different host - open issue https://github.com/ioBroker/ioBroker.js-controller/issues/1450
|
||||
#if [ $(jq -r .system.hostname ./iobroker-data/iobroker.json) != $(hostname) ]
|
||||
#then
|
||||
# bash iobroker host $(jq -r .system.hostname ./iobroker-data/iobroker.json)
|
||||
#fi
|
||||
echo "Done."
|
||||
echo ' '
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
|
||||
Reference in New Issue
Block a user