N'installe pas les certificats SSL directement mais via la commande reset, sauvegarde ces certificats lors d'une backup
This commit is contained in:
parent
99c8e96e08
commit
27ceb0af58
2
Makefile
2
Makefile
|
@ -19,8 +19,6 @@ install:
|
|||
chmod 0644 $(LIBDIR)/*.help
|
||||
install -o root -g root -m 0755 -d $(SHAREDIR)
|
||||
install -o root -g root -m 0755 share/* $(SHAREDIR)
|
||||
install -o openldap -g openldap -m 600 ldap.pem $(ETCDIR)
|
||||
install -o openldap -g openldap -m 600 ldap.key $(ETCDIR)
|
||||
|
||||
uninstall:
|
||||
rm $(BINDIR)/slapd-supann
|
||||
|
|
|
@ -32,7 +32,13 @@ echo "ok"
|
|||
mkdir -p /etc/ldap/slapd.d
|
||||
mkdir /var/lib/ldap/config-accesslog/
|
||||
|
||||
echo "Installation de la nouvelle configuration .."
|
||||
if [ ! -f /var/lib/ldap/ssl.pem -a ! -f /var/lib/ssl.key ]; then
|
||||
echo -n "Installation des certificats SSL par défaut .."
|
||||
cp ${LDIFDIR}/ssl.pem ${LDIFDIR}/ssl.key /var/lib/ldap
|
||||
echo "ok"
|
||||
fi
|
||||
|
||||
echo -n "Installation de la nouvelle configuration .. "
|
||||
slapadd -n0 -F/etc/ldap/slapd.d -l${LDIFDIR}/config.ldif
|
||||
|
||||
echo "Installation des schémas .."
|
||||
|
|
|
@ -43,9 +43,14 @@ find /var/lib/ldap -type f -delete
|
|||
echo "ok"
|
||||
|
||||
echo ""
|
||||
echo "Restauration du config.ldif .."
|
||||
echo -n "Restauration du config.ldif .."
|
||||
slapadd -n0 -F/etc/ldap/slapd.d/ -l"$BACKUPDIR/config.ldif"
|
||||
|
||||
echo ""
|
||||
echo -n "Restauration des certificats SSL .."
|
||||
cp $BACKUPDIR/ssl.pem $BACKUPDIR/ssl.key /var/lib/ldap
|
||||
echo "ok"
|
||||
|
||||
echo ""
|
||||
for i in `seq 1 $MAXDB`; do
|
||||
if [ -f "$BACKUPDIR/db-$i.ldif" ]; then
|
||||
|
|
Reference in New Issue