dataset/seed/openldap/a_voir/sauvegarde/schedule/scripts/annuaire

20 lines
408 B
Text
Raw Normal View History

2022-03-08 19:42:28 +01:00
#!/bin/bash
DESC="Exportation de l'annuaire LDAP"
. /usr/share/eole/schedule/config.sh
LDAPSAVDIR=$SAVDIR
LDAPSAVFILE=$LDAPSAVDIR/sauv_ldap.ldif
rm -f $LDAPSAVFILE
mkdir -p $LDAPSAVDIR
CreoleService slapd stop -c annuaire
CreoleRun "slapcat -v -f /etc/ldap/slapd.conf -o ldif-wrap=no" annuaire > $LDAPSAVFILE
slapd_error=$?
CreoleService slapd start -c annuaire
[ $slapd_error -ne 0 ] && exit 1
exit 0