From d57ea70ba74a0058239e74c9003dd8fe5ec91f7e Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Mon, 26 Sep 2016 17:49:02 +0200 Subject: [PATCH] make set -e a switch instead. --- nextcloud_install_production.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/nextcloud_install_production.sh b/nextcloud_install_production.sh index 2d1fc90d..6ec800bb 100644 --- a/nextcloud_install_production.sh +++ b/nextcloud_install_production.sh @@ -5,7 +5,10 @@ # This install from Nextcloud official stable build with PHP 7, MySQL 5.7 and Apche 2.4. # Ubuntu 16.04 is required. -set -e +# Check for errors and abort if something isn't right +# 1 = ON +# 0 = OFF +CHECKFORERRORS=0 # Nextcloud version STABLEVERSION="nextcloud-10.0.0" @@ -46,6 +49,14 @@ CLEARBOOT=$(dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cu UNIXUSER=ncadmin UNIXPASS=nextcloud +# set -e +if [ $CHECKFORERRORS -eq 1 ] +then + set -e +else + sleep 1 +fi + # Check if root if [ "$(whoami)" != "root" ] then