From 192bbdad12b05454cbf67596b3f86d473ac5b537 Mon Sep 17 00:00:00 2001 From: buanet Date: Tue, 18 Jul 2023 23:19:16 +0200 Subject: [PATCH] fix container restart in maintenance script --- CHANGELOG.md | 1 + debian/scripts/maintenance.sh | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3adada..a8a125f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Changelog ### v8.1.0-beta.4 (coming soon) +* fix container restart in maintenance script * fix running maintenance script as iobroker * v8.1.0-beta.3 (05.07.2023) * fix permission issue for restart container as iobroker user diff --git a/debian/scripts/maintenance.sh b/debian/scripts/maintenance.sh index 5f2a3a0..c0ab532 100644 --- a/debian/scripts/maintenance.sh +++ b/debian/scripts/maintenance.sh @@ -153,9 +153,7 @@ stop_iob() { status=$? if (( status >= 2 )); then # syntax error or fatal error return 1 - fi - - if (( status == 1 )); then # no processes matched + elif (( status == 1 )); then # no processes matched return fi @@ -166,11 +164,11 @@ stop_iob() { echo -e "\nTimeout reached. Killing remaining processes..." pgrep --list-full -u iobroker pkill --signal SIGKILL -u iobroker -f 'io.' - echo "Done." + echo "\nDone." return fi - echo -n "." sleep 1 + echo -n "." done else for ((i=0; i<3; i++)); do @@ -179,7 +177,7 @@ stop_iob() { done fi - echo -e "\nDone." + echo -e "Done." } # restart container