Renaming env variables and providing better defaults
This commit is contained in:
parent
1081b51fe9
commit
ecdd23e843
|
@ -32,8 +32,8 @@ if [ "$LAM_SKIP_PRECONFIGURE" != "true" ]; then
|
||||||
LDAP_SERVER="${LDAP_SERVER:-ldap://ldap:389}"
|
LDAP_SERVER="${LDAP_SERVER:-ldap://ldap:389}"
|
||||||
LDAP_DOMAIN="${LDAP_DOMAIN:-my-domain.com}"
|
LDAP_DOMAIN="${LDAP_DOMAIN:-my-domain.com}"
|
||||||
LDAP_BASE_DN="${LDAP_BASE_DN:-dc=${LDAP_DOMAIN//\./,dc=}}"
|
LDAP_BASE_DN="${LDAP_BASE_DN:-dc=${LDAP_DOMAIN//\./,dc=}}"
|
||||||
LDAP_USER_DN="${LDAP_USER_DN:-dc=${LDAP_DOMAIN//\./,dc=}}"
|
LDAP_USERS_DN="${LDAP_USERS_DN:-${LDAP_BASE_DN}}"
|
||||||
LDAP_GROUP_DN="${LDAP_GROUP_DN:-dc=${LDAP_DOMAIN//\./,dc=}}"
|
LDAP_GROUPS_DN="${LDAP_GROUPS_DN:-${LDAP_BASE_DN}}"
|
||||||
LDAP_ADMIN_USER="${LDAP_USER:-cn=admin,${LDAP_BASE_DN}}"
|
LDAP_ADMIN_USER="${LDAP_USER:-cn=admin,${LDAP_BASE_DN}}"
|
||||||
|
|
||||||
sed -i -f- /etc/ldap-account-manager/config.cfg <<- EOF
|
sed -i -f- /etc/ldap-account-manager/config.cfg <<- EOF
|
||||||
|
@ -47,8 +47,8 @@ EOF
|
||||||
s|^Passwd:.*|Passwd: ${LAM_PASSWORD_SSHA}|;
|
s|^Passwd:.*|Passwd: ${LAM_PASSWORD_SSHA}|;
|
||||||
s|^treesuffix:.*|treesuffix: ${LDAP_BASE_DN}|;
|
s|^treesuffix:.*|treesuffix: ${LDAP_BASE_DN}|;
|
||||||
s|^defaultLanguage:.*|defaultLanguage: ${LAM_LANG}.utf8|;
|
s|^defaultLanguage:.*|defaultLanguage: ${LAM_LANG}.utf8|;
|
||||||
s|^.*suffix_user:.*|types: suffix_user: ${LDAP_USER_DN}|;
|
s|^.*suffix_user:.*|types: suffix_user: ${LDAP_USERS_DN}|;
|
||||||
s|^.*suffix_group:.*|types: suffix_group: ${LDAP_GROUP_DN}|;
|
s|^.*suffix_group:.*|types: suffix_group: ${LDAP_GROUPS_DN}|;
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue