maintenance script fixes

This commit is contained in:
buanet
2022-02-04 13:16:33 +01:00
parent 15e87e08a0
commit c2707f3795
2 changed files with 18 additions and 13 deletions

View File

@@ -1,9 +1,11 @@
## Changelog ## Changelog
### v6.1.0-beta.1 (2021-12-23) ### v6.1.0-beta.2 (upcoming)
* some more corrections in maintenance script ([#232 @agross](https://github.com/buanet/ioBroker.docker/pull/232)) * adding breaks and optimizing maintenance script (fixes [#233](https://github.com/buanet/ioBroker.docker/issues/233))
* added autoconfirm parameter to upgrade function in maintenance script ([#229 @thost96](https://github.com/buanet/ioBroker.docker/pull/229)) * v6.1.0-beta.1 (2021-12-23)
* added alias "m" for maintenance script * some more corrections in maintenance script ([#232 @agross](https://github.com/buanet/ioBroker.docker/pull/232))
* added autoconfirm parameter to upgrade function in maintenance script ([#229 @thost96](https://github.com/buanet/ioBroker.docker/pull/229))
* added alias "m" for maintenance script
### v6.0.0 (2021-12-09) ### v6.0.0 (2021-12-09)
* moving docu/ restructuring readme * moving docu/ restructuring readme

View File

@@ -148,17 +148,20 @@ upgrade() {
then then
echo 'This command was already confirmed by -y or --yes option.' echo 'This command was already confirmed by -y or --yes option.'
fi fi
if [ $(cat /opt/scripts/.docker_config/.healthcheck) != 'maintenance' ]
then
echo 'Activating maintenance mode...' echo 'Activating maintenance mode...'
echo "maintenance" > /opt/scripts/.docker_config/.healthcheck echo "maintenance" > /opt/scripts/.docker_config/.healthcheck
sleep 1 sleep 1
echo 'Done.' echo 'Done.'
echo 'Stopping ioBroker...' echo 'Stopping ioBroker...'
pkill -u iobroker pkill -u iobroker
sleep 1 sleep 5
echo 'Done.' echo 'Done.'
fi
echo 'Upgrading js-controller...' echo 'Upgrading js-controller...'
iobroker update iobroker update
sleep 1
iobroker upgrade self iobroker upgrade self
sleep 1 sleep 1
echo 'Done.' echo 'Done.'