From 356edd99cdff1a59404674ea82604b64630d4292 Mon Sep 17 00:00:00 2001 From: ronivay Date: Tue, 13 Nov 2018 09:50:09 +0200 Subject: [PATCH] Set default variables so there's no situation they are empty --- xo-install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xo-install.sh b/xo-install.sh index febf8b5..1a46657 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -17,6 +17,15 @@ fi # See this file for all script configuration variables. source $CONFIG_FILE +# Set some default variables if sourcing config file fails for some reason +PORT=${PORT:-80} +INSTALLDIR=${INSTALLDIR:-"/etc/xo"} +BRANCH=${BRANCH:-"master"} +LOGFILE=${LOGFILE:-"$(dirname $0)/xo-install.log"} +AUTOUPDATE=${AUTOUPDATE:-"true"} +PRESERVE=${PRESERVE:-"3"} + +# Set path where new source is cloned/pulled XO_SRC_DIR="$INSTALLDIR/xo-src/xen-orchestra" # Protocol to use for webserver. If both of the X.509 certificate files exist,