diff --git a/xo-install.sh b/xo-install.sh index a94893f..b72444b 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -22,12 +22,15 @@ PORT=${PORT:-80} INSTALLDIR=${INSTALLDIR:-"/opt/xo"} BRANCH=${BRANCH:-"master"} LOGPATH="${LOGPATH:-$(dirname $0)/logs}" -LOGFILE="${LOGPATH}/xo-install.log-$(date +%Y%d%m%H%M)" AUTOUPDATE=${AUTOUPDATE:-"true"} PRESERVE=${PRESERVE:-"3"} XOUSER=${XOUSER:-"root"} CONFIGPATH="$(getent passwd $XOUSER | cut -d: -f6)" +# set variables not changeable in configfile +TIME=$(date +%Y%d%m%H%M) +LOGFILE="${LOGPATH}/xo-install.log-$TIME" + # Set path where new source is cloned/pulled XO_SRC_DIR="$INSTALLDIR/xo-src/xen-orchestra" @@ -353,8 +356,6 @@ function InstallXO { trap ErrorHandling ERR INT - TIME=$(date +%Y%d%m%H%M) - # Create user if doesn't exist (if defined) if [[ "$XOUSER" != "root" ]]; then