Adding lldap and authelia.
This commit is contained in:
25
all-apps/lldap/0.6.3/make-lldap-config.sh
Executable file
25
all-apps/lldap/0.6.3/make-lldap-config.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -a # export everything in the config for later use by envsubst
|
||||
|
||||
. $1 # source the apps.config file with then env vars
|
||||
|
||||
read -r -a APP_CONFIGS <<< "$APP_CONFIGS"
|
||||
|
||||
lldap_subdomain=
|
||||
|
||||
for config_string in ${APP_CONFIGS[@]}; do
|
||||
IFS=','
|
||||
read -r -a config <<< "$config_string"
|
||||
|
||||
app=${config[0]}
|
||||
subdomain=${config[1]}
|
||||
|
||||
if [ "$app" = "lldap" ]; then
|
||||
lldap_subdomain="$subdomain"
|
||||
fi
|
||||
done
|
||||
|
||||
export LLDAP_FULL_DOMAIN="$lldap_subdomain.$ROOT_DOMAIN"
|
||||
envsubst < app/lldap/lldap-config/lldap_config.toml.tmpl > app/lldap/lldap-config/lldap_config.toml
|
||||
Reference in New Issue
Block a user