From 70c972a0461fa60271a2e917961740ebcafefbd2 Mon Sep 17 00:00:00 2001 From: Roland Date: Sun, 13 Mar 2022 11:02:55 -0600 Subject: [PATCH] Exiting with failure when install script fails. --- install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 0073c13b..082cbc8d 100755 --- a/install.sh +++ b/install.sh @@ -47,6 +47,9 @@ git clone https://github.com/lrnselfreliance/wrolpi.git /opt/wrolpi || : (cd /opt/wrolpi && git fetch && git checkout "${BRANCH}" && git reset --hard origin/"${BRANCH}") || exit 4 /opt/wrolpi/scripts/ubuntu_20.04_install.sh 2>&1 | tee /opt/wrolpi/install.log +install_code=$? + +set +x echo "Install end $(date '+%Y-%m-%d %H:%M:%S')" >>/opt/wrolpi/install.log -exit $? +exit ${install_code}