Modified coding style

This commit is contained in:
Christian Luginbühl 2016-02-16 22:48:19 +01:00
parent dd01783d88
commit cad3117b44

View file

@ -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