mirror of
https://github.com/luzifer-docker/openldap.git
synced 2024-12-20 20:51:17 +00:00
Modified coding style
This commit is contained in:
parent
dd01783d88
commit
cad3117b44
1 changed files with 5 additions and 4 deletions
|
@ -25,7 +25,6 @@ if [[ ! -d /etc/ldap/slapd.d || "$SLAPD_FORCE_RECONFIGURE" == "true" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SLAPD_PPOLICY_DN_PREFIX="${SLAPD_PPOLICY_DN_PREFIX:-cn=default,ou=policies}"
|
|
||||||
SLAPD_ORGANIZATION="${SLAPD_ORGANIZATION:-${SLAPD_DOMAIN}}"
|
SLAPD_ORGANIZATION="${SLAPD_ORGANIZATION:-${SLAPD_DOMAIN}}"
|
||||||
cp -a /etc/ldap.dist/* /etc/ldap
|
cp -a /etc/ldap.dist/* /etc/ldap
|
||||||
|
|
||||||
|
@ -78,13 +77,15 @@ EOF
|
||||||
IFS=","; declare -a modules=($SLAPD_ADDITIONAL_MODULES)
|
IFS=","; declare -a modules=($SLAPD_ADDITIONAL_MODULES)
|
||||||
|
|
||||||
for module in "${modules[@]}"; do
|
for module in "${modules[@]}"; do
|
||||||
moduleFile="/etc/ldap/modules/${module}.ldif"
|
module_file="/etc/ldap/modules/${module}.ldif"
|
||||||
|
|
||||||
if [ "$module" == 'ppolicy' ]; then
|
if [ "$module" == 'ppolicy' ]; then
|
||||||
sed -i'' "s|\(olcPPolicyDefault: \)PPOLICY_DN|\1${SLAPD_PPOLICY_DN_PREFIX}$dc_string|" $moduleFile
|
SLAPD_PPOLICY_DN_PREFIX="${SLAPD_PPOLICY_DN_PREFIX:-cn=default,ou=policies}"
|
||||||
|
|
||||||
|
sed -i "s/\(olcPPolicyDefault: \)PPOLICY_DN/\1${SLAPD_PPOLICY_DN_PREFIX}$dc_string/g" $module_file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
slapadd -n0 -F /etc/ldap/slapd.d -l "$moduleFile" >/dev/null 2>&1
|
slapadd -n0 -F /etc/ldap/slapd.d -l "$module_file" >/dev/null 2>&1
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue