initial commit of file from CVS for e-smith-ldap on Wed 12 Jul 08:58:23 BST 2023
This commit is contained in:
21
root/sbin/e-smith/systemd/ldap-finish
Normal file
21
root/sbin/e-smith/systemd/ldap-finish
Normal file
@@ -0,0 +1,21 @@
|
||||
#! /bin/sh
|
||||
|
||||
exec 2>&1
|
||||
|
||||
LDIF=$(readlink -n /etc/openldap/ldif)
|
||||
TMP=$LDIF.$$
|
||||
if /usr/sbin/slapcat -l $TMP
|
||||
then
|
||||
mv -f $TMP $LDIF
|
||||
else
|
||||
echo slapcat dump of ldif failed - shutting down ldap service >&2
|
||||
echo probable corruption of ldap backend files >&2
|
||||
|
||||
# Don't bother to keep a zero length dump file
|
||||
if test ! -s $TMP
|
||||
then
|
||||
rm -f $TMP
|
||||
fi
|
||||
|
||||
fi
|
||||
|
Reference in New Issue
Block a user