From 10de4b1a550d3c2776da2e26cf2b5a95ba639067 Mon Sep 17 00:00:00 2001 From: buanet Date: Wed, 11 Oct 2023 00:18:38 +0200 Subject: [PATCH] Revert "add error handling for user scripts" This reverts commit 760a36f72a9d659d39a5979bb7247d3c22f5b960. --- .VERSION | 2 +- CHANGELOG.md | 4 ---- debian12/scripts/iobroker_startup.sh | 28 +++++++++++++++------------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.VERSION b/.VERSION index 6c9bb72..8f80905 100644 --- a/.VERSION +++ b/.VERSION @@ -1 +1 @@ -v9.1.0-beta.1 \ No newline at end of file +v9.0.1 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3becbd8..9a15126 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,5 @@ ## Changelog -### v9.1.0-beta.1 -* enhance logging in iobroker_startup.sh -* add error handling for user scripts - ### v9.0.1 (10.10.2023) * fix issue with avahi setup ([#384](https://github.com/buanet/ioBroker.docker/issues/384); [#385 by @z1r0](https://github.com/buanet/ioBroker.docker/pull/385)) * add silent cleanup to setup_avahi.sh diff --git a/debian12/scripts/iobroker_startup.sh b/debian12/scripts/iobroker_startup.sh index eb401d2..52da59f 100644 --- a/debian12/scripts/iobroker_startup.sh +++ b/debian12/scripts/iobroker_startup.sh @@ -133,7 +133,11 @@ if [[ -f /opt/.docker_config/.first_run ]]; then if [[ "$offlinemode" = "true" ]]; then echo "OFFLINE_MODE is \"true\". Skipping Linux package updates on first run." else - if ! bash /opt/scripts/setup_packages.sh -update; then echo "Failed."; fi + if bash /opt/scripts/setup_packages.sh -update; then + echo " " + else + echo "Error: Updating failed." + fi fi echo " " # Installing packages from ENV @@ -141,7 +145,11 @@ if [[ -f /opt/.docker_config/.first_run ]]; then echo "PACKAGES is set, but OFFLINE_MODE is \"true\". Skipping Linux package installation." elif [[ "$packages" != "" ]]; then echo "PACKAGES is set. Installing the following additional Linux packages: ""$packages" - if ! bash /opt/scripts/setup_packages.sh -install; then echo "Failed."; fi + if bash /opt/scripts/setup_packages.sh -install; then + echo " " + else + echo "Error: Installation failed." + fi fi echo " " # Register maintenance script @@ -497,23 +505,17 @@ elif [[ -f /opt/userscripts/userscript_firststart.sh || -f /opt/userscripts/user echo "Userscript for first start detected and this is the first start of a new container." echo "Running userscript_firststart.sh... " chmod 755 /opt/userscripts/userscript_firststart.sh - if ! bash /opt/userscripts/userscript_firststart.sh; then - echo "Failed." - else - echo "Done." - fi + bash /opt/userscripts/userscript_firststart.sh + echo "Done." fi if [[ -f /opt/userscripts/userscript_everystart.sh ]]; then echo "Userscript for every start detected. Running userscript_everystart.sh... " chmod 755 /opt/userscripts/userscript_everystart.sh - if ! bash /opt/userscripts/userscript_everystart.sh; then - echo "Failed." - else - echo "Done." - fi + bash /opt/userscripts/userscript_everystart.sh + echo "Done." fi - echo " " fi +echo " " # Removing first run an fresh install markers when exists if [[ -f /opt/.docker_config/.first_run ]]; then rm -f /opt/.docker_config/.first_run; fi