added group and domain support for conf file and repository

This commit is contained in:
2023-05-05 19:49:13 +02:00
parent c2751bf9eb
commit 23d36cc8af
2 changed files with 56 additions and 23 deletions

View File

@@ -53,8 +53,9 @@ export -f load_autoconf
# ------------------------------------------------------------------------------
# Load configuration with the following priorities:
# 1) Those given on command line, if any
# 2) <workingdir>/conf/<hostname>.conf (Hostname based and specific)
# 3) <workingdir>/conf/init.conf.sh (Generic default)
# 2) <workingdir>/conf/<realm>/<hostname>.conf (Hostname based and specific)
# 2) <workingdir>/conf/<hostname>.conf (Hostname based and specific)
# 3) <workingdir>/conf/init.conf.sh (Generic default, for testing)
load_configuration()
{
if [[ -n $CONFFILES ]]; then
@@ -71,7 +72,10 @@ load_configuration()
unset f
else
prnt I "Loading configuration..."
if [[ -e $MYPATH/conf/$HOSTNAME.conf.sh ]]; then
if [[ -e $MYPATH/conf/$REALM/$HOSTNAME.conf.sh ]]; then
prnt I "A specific configuration will be used."
. $MYPATH/conf/$HOSTNAME.conf.sh
elif [[ -e $MYPATH/conf/$HOSTNAME.conf.sh ]]; then
prnt I "A specific configuration will be used."
. $MYPATH/conf/$HOSTNAME.conf.sh
else