mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-19 19:39:01 +02:00
testing
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
### v5.2.0-beta3 (2021-09-04)
|
### v5.2.0-beta3 (2021-09-04)
|
||||||
|
* changes for backitup compatibility
|
||||||
* reducing layers in dockerfile
|
* reducing layers in dockerfile
|
||||||
* making hostname check mandatory for startup
|
* making hostname check mandatory for startup
|
||||||
* optimize startup log
|
* optimize startup log
|
||||||
|
|||||||
19
debian/scripts/maintenance.sh
vendored
19
debian/scripts/maintenance.sh
vendored
@@ -5,6 +5,7 @@
|
|||||||
############################
|
############################
|
||||||
|
|
||||||
autoconfirm=no # could be set to true by commandline option
|
autoconfirm=no # could be set to true by commandline option
|
||||||
|
killbyname=no # could be set to true by commandline option / undocumented, only for use with backitup restore scripts
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
##### declaration of functions #####
|
##### declaration of functions #####
|
||||||
@@ -46,7 +47,19 @@ check_status() {
|
|||||||
|
|
||||||
# turn maintenance mode ON
|
# turn maintenance mode ON
|
||||||
switch_on() {
|
switch_on() {
|
||||||
if [ $(cat /opt/scripts/.docker_config/.healthcheck) != 'maintenance' ] && [ "$autoconfirm" == "no" ] # maintenance mode OFF / autoconfirm = no
|
if [ $(cat /opt/scripts/.docker_config/.healthcheck) != 'maintenance' ] && [ "$killbyname" == "yes" ] # maintenance mode OFF / killbyname = yes / undocumented, only for use with backitup restore scripts
|
||||||
|
then
|
||||||
|
echo 'This command will activate maintenance mode and stop all node processes.'
|
||||||
|
echo 'Activating maintenance mode...'
|
||||||
|
echo "maintenance" > /opt/scripts/.docker_config/.healthcheck
|
||||||
|
sleep 1
|
||||||
|
echo 'Done.'
|
||||||
|
echo 'Stopping ioBroker...'
|
||||||
|
pkill node
|
||||||
|
sleep 1
|
||||||
|
echo 'Done.'
|
||||||
|
exit 0
|
||||||
|
elif [ $(cat /opt/scripts/.docker_config/.healthcheck) != 'maintenance' ] && [ "$autoconfirm" == "no" ] # maintenance mode OFF / autoconfirm = no
|
||||||
then
|
then
|
||||||
echo 'You are now going to stop ioBroker and activating maintenance mode for this container.'
|
echo 'You are now going to stop ioBroker and activating maintenance mode for this container.'
|
||||||
read -p 'Do you want to continue [yes/no]? ' A
|
read -p 'Do you want to continue [yes/no]? ' A
|
||||||
@@ -183,6 +196,10 @@ for i in $reverse; do
|
|||||||
autoconfirm=yes # setting autoconfrm option to "yes"
|
autoconfirm=yes # setting autoconfrm option to "yes"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-kbn|--killbyname)
|
||||||
|
killbyname=yes # setting killbyname option to "yes"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-a=*|--argument=*) # dummy exaple for parsing option with value
|
-a=*|--argument=*) # dummy exaple for parsing option with value
|
||||||
ARGUMENT="${i#*=}"
|
ARGUMENT="${i#*=}"
|
||||||
shift
|
shift
|
||||||
|
|||||||
Reference in New Issue
Block a user