Make use of config.d/configure.conf file for first setup
This commit is contained in:
@@ -15,15 +15,23 @@
|
||||
# fi
|
||||
# return 0
|
||||
#}
|
||||
if [ ! -f $(dirname "$0")/../config/setup_system.conf ]; then
|
||||
|
||||
#Check for configure.conf - used for frist setup of system
|
||||
if [[ -f $(dirname "$0")/../config.d/configure.conf ]]; then
|
||||
echo "System in configure-mode. Will use $(dirname "$0")/../config.d/configure.conf for setup."
|
||||
source $(dirname "$0")/../config.d/configure.conf
|
||||
else
|
||||
#Load default system setup file
|
||||
if [[ ! -f $(dirname "$0")/../config/setup_system.conf ]]; then
|
||||
echo "System configuration not found. Please make a copy of setup_system.conf.dist, name it setup_system.conf and check the settings in it before running."
|
||||
echo "Press any key to continue" && read -n 1 -s -r && exit 1
|
||||
fi
|
||||
source $(dirname "$0")/../config/setup_system.conf
|
||||
fi
|
||||
source $(dirname "$0")/../config/setup_system.conf
|
||||
|
||||
#Parse additional client-configs
|
||||
if [[ `ls -1 $(dirname "$0")/../config.d/*.conf 2>/dev/null | wc -l ` -gt 0 ]]; then
|
||||
#Parse additional client-configs
|
||||
if [[ `ls -1 $(dirname "$0")/../config.d/*.conf 2>/dev/null | wc -l ` -gt 0 ]]; then
|
||||
source $(dirname "$0")/../config.d/*.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
#Check if the Data- Directory is encrypted
|
||||
|
||||
@@ -72,6 +72,24 @@ if [[ ! -z "${DISTCONFIGPATH_SRC}" ]]; then
|
||||
fi
|
||||
echo "Sucessfully synced."
|
||||
echo ""
|
||||
|
||||
# Check, if we are in configure-mode and if so, remove the file and reread the now new synced configuration
|
||||
if [ -f $(dirname "$0")/../config.d/configure.conf ]; then
|
||||
#Check if configuration was obtained by sync
|
||||
if [ -f $(dirname "$0")/../config/setup_system.conf ]; then
|
||||
echo "Existing configuration found in Repository, removing configure-mode and reread the configuration."
|
||||
rm -f $(dirname "$0")/../config.d/configure.conf.bak >/dev/null
|
||||
mv $(dirname "$0")/../config.d/configure.conf $(dirname "$0")/../config.d/configure.conf.bak
|
||||
source $(dirname "$0")/../config/setup_system.conf
|
||||
else
|
||||
echo "System is in configure-mode and configuration repository was found and synced, but still not configuration was found"
|
||||
echo "checking file $(dirname "$0")/../config/setup_system.conf"
|
||||
echo ""
|
||||
echo "Please make a inital copy of config/setup_system.conf.dist to config/setup_system.conf and check all settings there."
|
||||
echo "Then rerun the logon script to sync the file to your repository."
|
||||
echo "Press any key to continue" && read -n 1 -s -r && exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
#Check if Repository is defined
|
||||
if [ "${CLIENT_SOFTWARE_DST}." == "." ]; then
|
||||
|
||||
Reference in New Issue
Block a user