Migrated configuration to a standalone file.

The deployed configuration file (xo-install.cfg) is not tracked by git,
so changes made by users won't affect their ability to update this git
repo.
This commit is contained in:
Tynan McAuley
2018-11-05 17:20:55 -05:00
parent afdd9f1c77
commit 3944e5dabf
3 changed files with 32 additions and 25 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
xo-install.log
xo-install.cfg
tests/*/*
tests/*
!tests/Ubuntu

23
sample.xo-install.cfg Normal file
View File

@@ -0,0 +1,23 @@
# Optional user that runs the service. root by default
#XOUSER="node"
# Port number where xen-orchestra service is bound
PORT="80"
# Base dir for installation and future updates
INSTALLDIR="/etc/xo"
# Git branch or tag (append tags/ before the tag name) where xen-orchestra sources are fetched
BRANCH="master"
# Log path for possible errors
LOGFILE="$(dirname $0)/xo-install.log"
# comma separated list of plugins to be installed, check README for more information
#PLUGINS="xo-server-transport-email,xo-server-usage-report,xo-server-perf-alert"
# NodeJS and Yarn are automatically updated when running update. Switch this option to false if you want to disable it.
AUTOUPDATE="true"
# Define the number of previous installations you want to keep. Needs to be at least 1
PRESERVE="3"

View File

@@ -6,33 +6,16 @@
# Repository: https://github.com/ronivay/XenOrchestraInstallerUpdater #
#########################################################################
### Start of editable variables ###
SAMPLE_CONFIG_FILE="sample.xo-install.cfg"
CONFIG_FILE="xo-install.cfg"
# Optional user that runs the service. root by default
#XOUSER="node"
# Deploy default configuration file if the user doesn't have their own yet.
if [[ ! -e "$CONFIG_FILE" ]]; then
cp $SAMPLE_CONFIG_FILE $CONFIG_FILE
fi
# Port number where xen-orchestra service is bound
PORT="80"
# Base dir for installation and future updates
INSTALLDIR="/etc/xo"
# Git branch or tag (append tags/ before the tag name) where xen-orchestra sources are fetched
BRANCH="master"
# Log path for possible errors
LOGFILE="$(dirname $0)/xo-install.log"
# comma separated list of plugins to be installed, check README for more information
#PLUGINS="xo-server-transport-email,xo-server-usage-report,xo-server-perf-alert"
# NodeJS and Yarn are automatically updated when running update. Switch this option to false if you want to disable it.
AUTOUPDATE="true"
# Define the number of previous installations you want to keep. Needs to be at least 1
PRESERVE="3"
### End of editable variables ###
# See this file for all script configuration variables.
source $CONFIG_FILE
function CheckUser {