From 58867e72a8b40653cae849fe71a183e62e9ec6a0 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Thu, 20 Jun 2024 20:27:37 +0300 Subject: [PATCH] Ensure proper exit code handling in script termination --- install/OneClickInstall/docspace-install.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/install/OneClickInstall/docspace-install.sh b/install/OneClickInstall/docspace-install.sh index 4ab24ee409..b54796a3c2 100644 --- a/install/OneClickInstall/docspace-install.sh +++ b/install/OneClickInstall/docspace-install.sh @@ -156,27 +156,27 @@ fi if [ "$DOCKER" == "true" ]; then if [ "$LOCAL_SCRIPTS" == "true" ]; then - bash install-Docker.sh ${PARAMETERS} + bash install-Docker.sh ${PARAMETERS} || EXIT_CODE=$? else curl -s -O ${DOWNLOAD_URL_PREFIX}/install-Docker.sh - bash install-Docker.sh ${PARAMETERS} + bash install-Docker.sh ${PARAMETERS} || EXIT_CODE=$? rm install-Docker.sh fi else if [ -f /etc/redhat-release ] ; then if [ "$LOCAL_SCRIPTS" == "true" ]; then - bash install-RedHat.sh ${PARAMETERS} + bash install-RedHat.sh ${PARAMETERS} || EXIT_CODE=$? else curl -s -O ${DOWNLOAD_URL_PREFIX}/install-RedHat.sh - bash install-RedHat.sh ${PARAMETERS} + bash install-RedHat.sh ${PARAMETERS} || EXIT_CODE=$? rm install-RedHat.sh fi elif [ -f /etc/debian_version ] ; then if [ "$LOCAL_SCRIPTS" == "true" ]; then - bash install-Debian.sh ${PARAMETERS} + bash install-Debian.sh ${PARAMETERS} || EXIT_CODE=$? else curl -s -O ${DOWNLOAD_URL_PREFIX}/install-Debian.sh - bash install-Debian.sh ${PARAMETERS} + bash install-Debian.sh ${PARAMETERS} || EXIT_CODE=$? rm install-Debian.sh fi else @@ -184,3 +184,5 @@ else exit 1; fi fi + +exit ${EXIT_CODE:-0}