mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-17 18:39:01 +02:00
v8.1.0-beta.3
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
### v8.1.0-beta.2 (coming soon)
|
### v8.1.0-beta.3 (05.07.2023)
|
||||||
|
* fix issue with js-controller ui upgrade
|
||||||
|
* fix small issues in maintenance script
|
||||||
|
* update action workflows
|
||||||
|
* v8.1.0-beta.2 (26.04.2023)
|
||||||
* prohibit restore when startup script is still running
|
* prohibit restore when startup script is still running
|
||||||
* extend time before restart after restore is done
|
* extend time before restart after restore is done
|
||||||
* influx data repo will be added automatically when PACKAGES contains influxdb or influxdb2-cli package
|
* influx data repo will be added automatically when PACKAGES contains influxdb or influxdb2-cli package
|
||||||
|
|||||||
42
debian/scripts/maintenance.sh
vendored
42
debian/scripts/maintenance.sh
vendored
@@ -59,23 +59,9 @@ enable_maintenance() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$killbyname" == yes ]]; then
|
|
||||||
# undocumented option, only for use with backitup restore scripts
|
|
||||||
# stops iobroker by terminating js-controller process by name (the old way)
|
|
||||||
echo 'This command will activate maintenance mode and stop js-controller.'
|
|
||||||
echo 'Activating maintenance mode...'
|
|
||||||
echo 'maintenance' > "$healthcheck"
|
|
||||||
sleep 1
|
|
||||||
echo 'Done.'
|
|
||||||
echo -n 'Stopping ioBroker...'
|
|
||||||
pkill -u iobroker -f iobroker.js-controller
|
|
||||||
sleep 5
|
|
||||||
echo 'Done.'
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 'You are now going to stop ioBroker and activate maintenance mode for this container.'
|
echo 'You are now going to stop ioBroker and activate maintenance mode for this container.'
|
||||||
|
|
||||||
|
if [[ "$killbyname" != yes ]]; then
|
||||||
if [[ "$autoconfirm" != yes ]]; then
|
if [[ "$autoconfirm" != yes ]]; then
|
||||||
local reply
|
local reply
|
||||||
|
|
||||||
@@ -85,14 +71,12 @@ enable_maintenance() {
|
|||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
fi
|
||||||
echo 'This command was already confirmed by the -y or --yes option.'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo 'Activating maintenance mode...'
|
echo 'Activating maintenance mode...'
|
||||||
echo 'maintenance' > "$healthcheck"
|
echo 'maintenance' > "$healthcheck"
|
||||||
sleep 1
|
sleep 1
|
||||||
echo 'Done.'
|
|
||||||
echo -n 'Stopping ioBroker...'
|
echo -n 'Stopping ioBroker...'
|
||||||
stop_iob
|
stop_iob
|
||||||
}
|
}
|
||||||
@@ -116,8 +100,6 @@ disable_maintenance() {
|
|||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo 'This command was already confirmed by the -y or --yes option.'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo 'Deactivating maintenance mode and forcing container to stop or restart...'
|
echo 'Deactivating maintenance mode and forcing container to stop or restart...'
|
||||||
@@ -142,8 +124,6 @@ upgrade_jscontroller() {
|
|||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo 'This command was already confirmed by the -y or --yes option.'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! maintenance_enabled > /dev/null; then
|
if ! maintenance_enabled > /dev/null; then
|
||||||
@@ -169,16 +149,19 @@ stop_iob() {
|
|||||||
local status timeout
|
local status timeout
|
||||||
|
|
||||||
timeout="$(date --date="now + $pkill_timeout sec" +%s)"
|
timeout="$(date --date="now + $pkill_timeout sec" +%s)"
|
||||||
pkill -u iobroker -f iobroker.js-controller
|
pkill -u iobroker -f 'iobroker.js-controller[^/]*$'
|
||||||
status=$?
|
status=$?
|
||||||
if (( status >= 2 )); then # syntax error or fatal error
|
if (( status >= 2 )); then # syntax error or fatal error
|
||||||
|
echo 'fatal error' #for logging
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( status == 1 )); then # no processes matched
|
if (( status == 1 )); then # no processes matched
|
||||||
|
echo 'no process matched' #for logging
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$killbyname" != yes ]]; then
|
||||||
# pgrep exits with status 1 when there are no matches
|
# pgrep exits with status 1 when there are no matches
|
||||||
while pgrep -u iobroker > /dev/null; (( $? != 1 )); do
|
while pgrep -u iobroker > /dev/null; (( $? != 1 )); do
|
||||||
if (($(date +%s) > timeout)); then
|
if (($(date +%s) > timeout)); then
|
||||||
@@ -188,10 +171,15 @@ stop_iob() {
|
|||||||
echo 'Done.'
|
echo 'Done.'
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n '.'
|
echo -n '.'
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
for ((i=0; i<3; i++)); do
|
||||||
|
sleep 1
|
||||||
|
echo -n '.'
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e '\nDone.'
|
echo -e '\nDone.'
|
||||||
}
|
}
|
||||||
@@ -210,12 +198,12 @@ restart_container() {
|
|||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo 'This command was already confirmed by the -y or --yes option.'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! maintenance_enabled > /dev/null; then
|
||||||
echo -n 'Stopping ioBroker...'
|
echo -n 'Stopping ioBroker...'
|
||||||
stop_iob
|
stop_iob
|
||||||
|
fi
|
||||||
|
|
||||||
echo 'Container will be stopped or restarted in 5 seconds...'
|
echo 'Container will be stopped or restarted in 5 seconds...'
|
||||||
sleep 5
|
sleep 5
|
||||||
@@ -238,8 +226,6 @@ restore_iobroker() {
|
|||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo 'This command was already confirmed by the -y or --yes option.'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if check_starting > /dev/null; then
|
if check_starting > /dev/null; then
|
||||||
|
|||||||
Reference in New Issue
Block a user