move date variable to the beginning so that logfile and install directory date match
This commit is contained in:
@@ -22,12 +22,15 @@ PORT=${PORT:-80}
|
|||||||
INSTALLDIR=${INSTALLDIR:-"/opt/xo"}
|
INSTALLDIR=${INSTALLDIR:-"/opt/xo"}
|
||||||
BRANCH=${BRANCH:-"master"}
|
BRANCH=${BRANCH:-"master"}
|
||||||
LOGPATH="${LOGPATH:-$(dirname $0)/logs}"
|
LOGPATH="${LOGPATH:-$(dirname $0)/logs}"
|
||||||
LOGFILE="${LOGPATH}/xo-install.log-$(date +%Y%d%m%H%M)"
|
|
||||||
AUTOUPDATE=${AUTOUPDATE:-"true"}
|
AUTOUPDATE=${AUTOUPDATE:-"true"}
|
||||||
PRESERVE=${PRESERVE:-"3"}
|
PRESERVE=${PRESERVE:-"3"}
|
||||||
XOUSER=${XOUSER:-"root"}
|
XOUSER=${XOUSER:-"root"}
|
||||||
CONFIGPATH="$(getent passwd $XOUSER | cut -d: -f6)"
|
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
|
# Set path where new source is cloned/pulled
|
||||||
XO_SRC_DIR="$INSTALLDIR/xo-src/xen-orchestra"
|
XO_SRC_DIR="$INSTALLDIR/xo-src/xen-orchestra"
|
||||||
|
|
||||||
@@ -353,8 +356,6 @@ function InstallXO {
|
|||||||
|
|
||||||
trap ErrorHandling ERR INT
|
trap ErrorHandling ERR INT
|
||||||
|
|
||||||
TIME=$(date +%Y%d%m%H%M)
|
|
||||||
|
|
||||||
# Create user if doesn't exist (if defined)
|
# Create user if doesn't exist (if defined)
|
||||||
|
|
||||||
if [[ "$XOUSER" != "root" ]]; then
|
if [[ "$XOUSER" != "root" ]]; then
|
||||||
|
Reference in New Issue
Block a user