10 lines
305 B
Bash
Executable file
10 lines
305 B
Bash
Executable file
if [ `find /etc/openldap/slapd.conf -mmin +1 | wc -l` == 0 ]
|
|
then
|
|
rm -Rf /etc/openldap/slapd.d/*
|
|
slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d/
|
|
systemctl stop slapd
|
|
slapindex
|
|
echo "changed=yes comment='cleaned /etc/openldap/slapd.d and ran slaptest'"
|
|
else
|
|
echo "changed=no"
|
|
fi
|