forked from stove/dataset
20 lines
408 B
Text
20 lines
408 B
Text
|
#!/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
|