mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-18 02:49:01 +02:00
small fixes
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
## Changelog
|
||||
|
||||
### v7.1.0-beta.1 (coming soon)
|
||||
* testing strict mode for iobroker-startup.sh
|
||||
* fixing "unary operator expected" error
|
||||
* add restart option to maintenance script
|
||||
* enhance logging
|
||||
* test strict mode for iobroker-startup.sh
|
||||
* fix "unary operator expected" error
|
||||
|
||||
### v7.0.1 (05.07.2022)
|
||||
* backitup restore patch
|
||||
|
||||
5
debian/scripts/iobroker_startup.sh
vendored
5
debian/scripts/iobroker_startup.sh
vendored
@@ -37,8 +37,8 @@ echo -n "$(printf -- '-%.0s' {1..25})" && echo -n " "$dati" " && echo "
|
||||
echo "$(printf -- '-%.0s' {1..80})"
|
||||
echo ' '
|
||||
echo "$(printf -- '-%.0s' {1..80})"
|
||||
echo "----- Welcome to your ioBroker-container! -----"
|
||||
echo "----- Startupscript is now running. -----"
|
||||
echo "----- Welcome to your ioBroker Docker container! -----"
|
||||
echo "----- Startupscript is now running! -----"
|
||||
echo "----- Please be patient! -----"
|
||||
echo "$(printf -- '-%.0s' {1..80})"
|
||||
echo ' '
|
||||
@@ -486,6 +486,7 @@ echo "$(printf -- '-%.0s' {1..80})"
|
||||
echo ' '
|
||||
echo "Starting ioBroker..."
|
||||
echo ' '
|
||||
echo "##### #### ### ## # iobroker.js-controller log output # ## ### #### #####"
|
||||
|
||||
# Setting healthcheck status to "running"
|
||||
echo "running" > /opt/scripts/.docker_config/.healthcheck
|
||||
|
||||
31
debian/scripts/maintenance.sh
vendored
31
debian/scripts/maintenance.sh
vendored
@@ -22,6 +22,7 @@ display_help() {
|
||||
echo ' on > switches mantenance mode ON'
|
||||
echo ' off > switches mantenance mode OFF and stops or restarts the container'
|
||||
echo ' upgrade > puts the container to maintenance mode and upgrades ioBroker'
|
||||
echo ' restart > stops iobroker and stops or restarts the container'
|
||||
echo ' help > shows this help'
|
||||
echo ''
|
||||
echo 'OPTIONS'
|
||||
@@ -157,6 +158,33 @@ upgrade_jscontroller() {
|
||||
pkill -u root
|
||||
}
|
||||
|
||||
# restart container
|
||||
restart_container() {
|
||||
echo 'You are now going to call a restart of your container.'
|
||||
echo 'Restarting will work depending on the configured restart policy.'
|
||||
|
||||
if [[ "$autoconfirm" != yes ]]; then
|
||||
local reply
|
||||
|
||||
read -rp 'Do you want to continue [yes/no]? ' reply
|
||||
if [[ "$reply" == y || "$reply" == Y || "$reply" == yes ]]; then
|
||||
: # continue
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
echo 'This command was already confirmed by the -y or --yes option.'
|
||||
fi
|
||||
|
||||
echo -n 'Stopping ioBroker...'
|
||||
stop_iob
|
||||
|
||||
echo 'Container will be stopped or restarted in 5 seconds...'
|
||||
sleep 5
|
||||
echo 'stopping' > "$healthcheck"
|
||||
pkill -u root
|
||||
}
|
||||
|
||||
# stop iobroker and wait until all processes stopped or pkill_timeout is reached
|
||||
stop_iob() {
|
||||
local status timeout
|
||||
@@ -211,6 +239,9 @@ for arg in "$@"; do
|
||||
upgrade)
|
||||
run=(upgrade_jscontroller)
|
||||
;;
|
||||
restart)
|
||||
run=(restart_container)
|
||||
;;
|
||||
-y|--yes)
|
||||
autoconfirm=yes
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user