fix container restart in maintenance script

This commit is contained in:
buanet
2023-07-18 23:19:16 +02:00
parent 1553c37265
commit 192bbdad12
2 changed files with 5 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
## Changelog ## Changelog
### v8.1.0-beta.4 (coming soon) ### v8.1.0-beta.4 (coming soon)
* fix container restart in maintenance script
* fix running maintenance script as iobroker * fix running maintenance script as iobroker
* v8.1.0-beta.3 (05.07.2023) * v8.1.0-beta.3 (05.07.2023)
* fix permission issue for restart container as iobroker user * fix permission issue for restart container as iobroker user

View File

@@ -153,9 +153,7 @@ stop_iob() {
status=$? status=$?
if (( status >= 2 )); then # syntax error or fatal error if (( status >= 2 )); then # syntax error or fatal error
return 1 return 1
fi elif (( status == 1 )); then # no processes matched
if (( status == 1 )); then # no processes matched
return return
fi fi
@@ -166,11 +164,11 @@ stop_iob() {
echo -e "\nTimeout reached. Killing remaining processes..." echo -e "\nTimeout reached. Killing remaining processes..."
pgrep --list-full -u iobroker pgrep --list-full -u iobroker
pkill --signal SIGKILL -u iobroker -f 'io.' pkill --signal SIGKILL -u iobroker -f 'io.'
echo "Done." echo "\nDone."
return return
fi fi
echo -n "."
sleep 1 sleep 1
echo -n "."
done done
else else
for ((i=0; i<3; i++)); do for ((i=0; i<3; i++)); do
@@ -179,7 +177,7 @@ stop_iob() {
done done
fi fi
echo -e "\nDone." echo -e "Done."
} }
# restart container # restart container