Add support for custom Xen Orchestra repository

This commit is contained in:
Andrzej Ressel
2020-06-05 02:27:01 +02:00
parent 50885cac39
commit 615e32c3bc
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
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.
# Also, you can set this to "release" to use the latest tagged branch.
BRANCH="master"

View File

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