diff --git a/.VERSION b/.VERSION index 360908c..7bc0d81 100644 --- a/.VERSION +++ b/.VERSION @@ -1 +1 @@ -v8.1.0-beta.3 \ No newline at end of file +v8.1.0-beta.4 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a3bacb9..73c15a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,12 @@ ## Changelog -### v8.1.0-beta.3 (05.07.2023) -* fix permission issue for restart container as iobroker user -* fix issue with js-controller ui upgrade -* fix small issues in maintenance script -* update action workflows +### v8.1.0-beta.4 (coming soon) +* fix running maintenance script as iobroker +* v8.1.0-beta.3 (05.07.2023) + * fix permission issue for restart container as iobroker user + * 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 * extend time before restart after restore is done diff --git a/debian/scripts/iobroker_startup.sh b/debian/scripts/iobroker_startup.sh index 2005c62..6d50a9d 100644 --- a/debian/scripts/iobroker_startup.sh +++ b/debian/scripts/iobroker_startup.sh @@ -149,9 +149,9 @@ if [[ -f /opt/.first_run ]]; then echo ' ' # Register maintenance script echo -n 'Registering maintenance script as command... ' - echo "alias maintenance=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc - echo "alias maint=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc - echo "alias m=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc + echo "alias maintenance='/opt/scripts/maintenance.sh'" >> /etc/bash.bashrc + echo "alias maint='/opt/scripts/maintenance.sh'" >> /etc/bash.bashrc + echo "alias m='/opt/scripts/maintenance.sh'" >> /etc/bash.bashrc echo 'Done.' else echo "This is not the first run of this container. Skipping first run preparation." diff --git a/debian/scripts/maintenance.sh b/debian/scripts/maintenance.sh index 91409f7..e6ffcf2 100644 --- a/debian/scripts/maintenance.sh +++ b/debian/scripts/maintenance.sh @@ -152,22 +152,20 @@ stop_iob() { pkill -u iobroker -f 'iobroker.js-controller[^/]*$' status=$? if (( status >= 2 )); then # syntax error or fatal error - echo 'fatal error' #for logging return 1 fi if (( status == 1 )); then # no processes matched - echo 'no process matched' #for logging return fi if [[ "$killbyname" != yes ]]; then # pgrep exits with status 1 when there are no matches - while pgrep -u iobroker > /dev/null; (( $? != 1 )); do + while pgrep -u iobroker -f 'io.' > /dev/null; (( $? != 1 )); do if (($(date +%s) > timeout)); then echo -e '\nTimeout reached. Killing remaining processes...' pgrep --list-full -u iobroker - pkill --signal SIGKILL -u iobroker + pkill --signal SIGKILL -u iobroker -f 'io.' echo 'Done.' return fi