Merge pull request #48 from jereksel/custom-xo-fork

Add support for custom Xen Orchestra repository
This commit is contained in:
Roni Väyrynen
2020-06-05 08:22:25 +03:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -10,6 +10,9 @@ INSTALLDIR="/opt/xo"
# Configuration is stored in XOUSER's home directory and by default will be overwritten with every update done by this script. Set CONFIGUPDATE to false if you don't want this to happen # Configuration is stored in XOUSER's home directory and by default will be overwritten with every update done by this script. Set CONFIGUPDATE to false if you don't want this to happen
CONFIGUPDATE=true CONFIGUPDATE=true
# Location of Xen Orchestra repository
REPOSITORY="https://github.com/vatesfr/xen-orchestra"
# Git branch or tag (append tags/ before the tag name) where xen-orchestra sources are fetched. # Git branch or tag (append tags/ before the tag name) where xen-orchestra sources are fetched.
# Also, you can set this to "release" to use the latest tagged branch. # Also, you can set this to "release" to use the latest tagged branch.
BRANCH="master" BRANCH="master"

View File

@@ -27,6 +27,7 @@ PRESERVE=${PRESERVE:-"3"}
XOUSER=${XOUSER:-"root"} XOUSER=${XOUSER:-"root"}
CONFIGPATH="$(getent passwd $XOUSER | cut -d: -f6)" CONFIGPATH="$(getent passwd $XOUSER | cut -d: -f6)"
PLUGINS="${PLUGINS:-"none"}" PLUGINS="${PLUGINS:-"none"}"
REPOSITORY="${REPOSITORY:-"https://github.com/vatesfr/xen-orchestra"}"
# set variables not changeable in configfile # set variables not changeable in configfile
TIME=$(date +%Y%d%m%H%M) TIME=$(date +%Y%d%m%H%M)
@@ -416,8 +417,8 @@ function InstallXO {
if [[ ! -d "$XO_SRC_DIR" ]]; then if [[ ! -d "$XO_SRC_DIR" ]]; then
cmdlog "mkdir -p \"$XO_SRC_DIR\"" cmdlog "mkdir -p \"$XO_SRC_DIR\""
mkdir -p "$XO_SRC_DIR" mkdir -p "$XO_SRC_DIR"
cmdlog "git clone https://github.com/vatesfr/xen-orchestra \"$XO_SRC_DIR\"" cmdlog "git clone \"${REPOSITORY}\" \"$XO_SRC_DIR\""
git clone https://github.com/vatesfr/xen-orchestra "$XO_SRC_DIR" >>$LOGFILE 2>&1 git clone "${REPOSITORY}" "$XO_SRC_DIR" >>$LOGFILE 2>&1
else else
cmdlog "cd \"$XO_SRC_DIR\"" cmdlog "cd \"$XO_SRC_DIR\""
cd "$XO_SRC_DIR" >>$LOGFILE 2>&1 cd "$XO_SRC_DIR" >>$LOGFILE 2>&1