diff --git a/.VERSION b/.VERSION
index 9773998..6421407 100644
--- a/.VERSION
+++ b/.VERSION
@@ -1 +1 @@
-v6.0.0
+v6.1.0-beta.1
\ No newline at end of file
diff --git a/.github/workflows/build-debian-image-dev-node16.yml b/.github/workflows/build-debian-image-dev-node16.yml
index dcdde27..a6494e3 100644
--- a/.github/workflows/build-debian-image-dev-node16.yml
+++ b/.github/workflows/build-debian-image-dev-node16.yml
@@ -1,5 +1,5 @@
# Github action to build Docker image from dev branch (tag: dev)
-name: Build debian based image (dev-node16)
+name: Build debian image (dev-node16)
on:
workflow_dispatch:
diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml
index 3adaaa2..c718ba9 100644
--- a/.github/workflows/build-debian-image-dev.yml
+++ b/.github/workflows/build-debian-image-dev.yml
@@ -1,5 +1,5 @@
# Github action to build Docker image from dev branch (tag: dev)
-name: Build debian based image (dev)
+name: Build debian image (dev)
on:
workflow_dispatch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c8482e5..75349f0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
## Changelog
+### v6.1.0-beta.1 (2021-12-20)
+* 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)
* moving docu/ restructuring readme
* v6.0.0-beta1 (2021-10-07)
@@ -7,7 +11,7 @@
* adding beta-node16 tag for beta testing node16
* updating documentation
* v5.3.0-beta1 (2021-10-07)
- * adding check (installed) PACKAGES on startup (#201)
+ * adding check (installed) PACKAGES on startup (fixes [#201](https://github.com/buanet/ioBroker.docker/issues/201))
* adding packages for discovery adapter
* adding packages for backitup adapter
* reorganizing Dockerfile
@@ -29,12 +33,12 @@
* adding labels in OCI standard format
* adding packages update on first start
* adding file for docker detection by ioBroker adapters
- * adding best practice for states db migation in readme
+ * adding best practice for states db migration in readme
* removing couchdb option for states db (no longer supported)
* v5.2.0-beta1 (2021-05-04)
* added upgrade parameter to maintenance script
- * added expose for default admin ui port (#172)
- * added shortform for maintenance script
+ * added expose for default admin ui port (fixes [#172](https://github.com/buanet/ioBroker.docker/issues/172))
+ * added short form for maintenance script
* v5.2.0-beta (2021-04-02)
* some renaming to optimize automated build
* changes in versioning
@@ -43,7 +47,7 @@
### v5.1.0 (2020-11-05)
* v5.0.2-beta (2020-07-28)
* added docker tag for majorversion latest
- * extend readme.md doku
+ * extend readme.md docu
* added maintenance script
* added container healthcheck
* fixed configuration procedure and logging for objects and states db setup
@@ -84,7 +88,7 @@
### v4.1.0 (2020-01-17)
* improved readme.md
* v4.0.3-beta (2020-01-06)
- * added support to restore backup on startup
+ * added support to restore backup on startup ([#56 @duffbeer2000](https://github.com/buanet/ioBroker.docker/pull/56))
* small fixes according to "docker best practices"
* v4.0.2-beta (2019-12-10)
* ~~added env for activating redis~~
@@ -104,13 +108,13 @@
* v3.1.2-beta (2019-09-03)
* using node 10 instead of node 8
* v3.1.1-beta (2019-09-02)
- * adding env for setting uid/ gid for iobroker-user
+ * adding env for setting uid/ gid for iobroker-user ([#33 @mplogas](https://github.com/buanet/ioBroker.docker/pull/33))
### v3.1.0 (2019-08-21)
* v3.0.3-beta (2019-08-21)
* switching base image from "debian:latest" to "debian:stretch"
* v3.0.2-beta (2019-06-13)
- * using gosu instead of sudo
+ * using gosu instead of sudo ([#26 @SchumyHao](https://github.com/buanet/ioBroker.docker/pull/26))
* changing output of ioBroker logging
* v3.0.1-beta (2019-05-18)
* ~~switching back to iobroker-daemon for startup~~
diff --git a/debian/scripts/iobroker_startup.sh b/debian/scripts/iobroker_startup.sh
index 5a7fb41..e268ff5 100644
--- a/debian/scripts/iobroker_startup.sh
+++ b/debian/scripts/iobroker_startup.sh
@@ -86,6 +86,7 @@ then
echo "Registering maintenance script as command..."
echo "alias maintenance=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
echo "alias maint=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
+ echo "alias m=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
echo "Done."
echo ' '
fi
diff --git a/debian/scripts/maintenance.sh b/debian/scripts/maintenance.sh
index a02a60a..11aa914 100644
--- a/debian/scripts/maintenance.sh
+++ b/debian/scripts/maintenance.sh
@@ -17,20 +17,21 @@ display_help() {
echo ''
echo "Usage: maintenance [ COMMAND ] [ OPTION ]"
echo " maint [ COMMAND ] [ OPTION ]"
+ echo " m [ COMMAND ] [ OPTION ]"
echo ''
echo "COMMANDS"
echo "------------------"
- echo " status > gives the current state of maintenance mode"
+ echo " status > reports the current state of maintenance mode"
echo " on > switches mantenance mode ON"
- echo " off > switches mantenance mode OFF and shuts down/ restarts container"
- echo " upgrade > will put container to maintenance mode and upgrade iobroker"
+ echo " off > switches mantenance mode OFF and shuts down or restarts container"
+ echo " upgrade > will put container to maintenance mode and upgrade ioBroker"
echo " help > shows this help"
echo ''
echo "OPTIONS"
echo "------------------"
echo " -y|--yes > confirms the used command without asking"
- echo " -h|--help > shows this help"
- echo ''
+ echo " -h|--help > shows this help"
+ echo ''
exit 0
}
@@ -100,11 +101,11 @@ switch_off() {
if [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "no" ] # maintenance mode ON / autoconfirm = no
then
echo 'You are now going to deactivate maintenance mode for this container.'
- echo 'Depending on the restart policy, your container will be stopped/ restarted immediately.'
+ echo 'Depending on the restart policy, your container will be stopped or restarted immediately.'
read -p 'Do you want to continue [yes/no]? ' A
if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
then
- echo 'Deactivating maintenance mode and forcing container to stop/ restart...'
+ echo 'Deactivating maintenance mode and forcing container to stop or restart...'
echo "stopping" > /opt/scripts/.docker_config/.healthcheck
pkill -u root
echo 'Done.'
@@ -115,9 +116,9 @@ switch_off() {
elif [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "yes" ] # maintenance mode ON / autoconfirm = yes
then
echo 'You are now going to deactivate maintenance mode for this container.'
- echo 'Depending on the restart policy, your container will be stopped/ restarted immediately.'
+ echo 'Depending on the restart policy, your container will be stopped or restarted immediately.'
echo 'This command was already confirmed by -y or --yes option.'
- echo 'Deactivating maintenance mode and forcing container to stop/ restart...'
+ echo 'Deactivating maintenance mode and forcing container to stop or restart...'
echo "stopping" > /opt/scripts/.docker_config/.healthcheck
pkill -u root
echo 'Done.'
@@ -132,31 +133,40 @@ upgrade() {
echo 'You are now going to upgrade your js-controller.'
echo 'As this will change data in /opt/iobroker, make sure you have a backup!'
echo 'During the upgrade process the container will automatically switch into maintenance mode and stop ioBroker.'
- echo 'Depending of the restart policy, you container will be stoped/ restarted automatically after the upgrade.'
- read -p 'Do you want to continue [yes/no]? ' A
- if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
+ echo 'Depending of the restart policy, your container will be stopped or restarted automatically after the upgrade.'
+
+ if [ "$autoconfirm" == "no" ]
then
- echo 'Activating maintenance mode...'
- echo "maintenance" > /opt/scripts/.docker_config/.healthcheck
- sleep 1
- echo 'Done.'
- echo 'Stopping ioBroker...'
- pkill -u iobroker
- sleep 1
- echo 'Done.'
- echo 'Upgrading js-controller...'
- iobroker update
- iobroker upgrade self
- sleep 1
- echo 'Done.'
- echo 'Container will be stopped/ restarted in 5 seconds...'
- sleep 5
- echo "stopping" > /opt/scripts/.docker_config/.healthcheck
- pkill -u root
- exit 0
- else
- exit 0
+ read -p 'Do you want to continue [yes/no]? ' A
+ if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
+ then
+ : # Continue.
+ else
+ exit 0
+ fi
+ elif [ "$autoconfirm" == "yes" ]
+ then
+ echo 'This command was already confirmed by -y or --yes option.'
fi
+
+ echo 'Activating maintenance mode...'
+ echo "maintenance" > /opt/scripts/.docker_config/.healthcheck
+ sleep 1
+ echo 'Done.'
+ echo 'Stopping ioBroker...'
+ pkill -u iobroker
+ sleep 1
+ echo 'Done.'
+ echo 'Upgrading js-controller...'
+ iobroker update
+ iobroker upgrade self
+ sleep 1
+ echo 'Done.'
+ echo 'Container will be stopped or restarted in 5 seconds...'
+ sleep 5
+ echo "stopping" > /opt/scripts/.docker_config/.healthcheck
+ pkill -u root
+ exit 0
}
########################################
@@ -169,7 +179,7 @@ for i in "$@"; do
reverse="$i $reverse"
done
-# checking the arguments
+# checking the arguments
for i in $reverse; do
case $i in
help|-h|--help)
@@ -218,4 +228,4 @@ for i in $reverse; do
esac
done
-exit 0
\ No newline at end of file
+exit 0
diff --git a/src/README_docker_hub_buanet.md b/src/README_docker_hub_buanet.md
index 39010e7..f9a2eba 100644
--- a/src/README_docker_hub_buanet.md
+++ b/src/README_docker_hub_buanet.md
@@ -1,8 +1,8 @@
-
+
-[](https://hub.docker.com/repository/docker/buanet/iobroker)
-[](https://hub.docker.com/repository/docker/buanet/iobroker)
-[](https://hub.docker.com/repository/docker/buanet/iobroker)
+[](https://hub.docker.com/r/buanet/iobroker)
+[](https://hub.docker.com/r/buanet/iobroker)
+[](https://hub.docker.com/r/buanet/iobroker)
[)](https://github.com/buanet/ioBroker.docker/actions/workflows/build-debian-image-main.yml)
[](https://github.com/buanet/ioBroker.docker/releases)
[](https://github.com/buanet/ioBroker.docker/issues)
@@ -10,7 +10,7 @@
[](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md)
[](https://paypal.me/buanet)
-# Important Note
+# Important note
New major image versions (e.g. v4, v5, v6) always come with a new major version of node! This might lead to problems when you update your ioBroker container by simply recreating it from the new major version image! To avoid having trouble with recompiling adapters, it is recommended to upgrade your container manually with backup and restore procedure. For more details please see the maintenance part of the new [ioBroker Docker image docs](https://docs.buanet.de/iobroker-docker-image/docs/#maintenance).
diff --git a/src/README_docker_hub_iobroker.md b/src/README_docker_hub_iobroker.md
index 445abc2..cca5e50 100644
--- a/src/README_docker_hub_iobroker.md
+++ b/src/README_docker_hub_iobroker.md
@@ -1,15 +1,17 @@
-
+###### [iobroker/iobroker](https://hub.docker.com/r/iobroker/iobroker) is an alias for [buanet/iobroker](https://hub.docker.com/r/buanet/iobroker)
+
+
-[](https://hub.docker.com/repository/docker/buanet/iobroker)
-[](https://hub.docker.com/repository/docker/buanet/iobroker)
-[](https://hub.docker.com/repository/docker/buanet/iobroker)
+[](https://hub.docker.com/r/buanet/iobroker)
+[](https://hub.docker.com/r/buanet/iobroker)
+[](https://hub.docker.com/r/buanet/iobroker)
[)](https://github.com/buanet/ioBroker.docker/actions/workflows/build-debian-image-main.yml)
[](https://github.com/buanet/ioBroker.docker/releases)
[](https://github.com/buanet/ioBroker.docker/issues)
[](https://github.com/buanet/ioBroker.docker)
[](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md)
-# Important Note
+# Important note
New major image versions (e.g. v4, v5, v6) always come with a new major version of node! This might lead to problems when you update your ioBroker container by simply recreating it from the new major version image! To avoid having trouble with recompiling adapters, it is recommended to upgrade your container manually with backup and restore procedure. For more details please see the maintenance part of the new [ioBroker Docker image docs](https://docs.buanet.de/iobroker-docker-image/docs/#maintenance).