slapd.conf is no more used, but ldap.conf need to be saved/restored

This commit is contained in:
Josué Tille 2020-05-28 21:10:15 +02:00 committed by Alexandre Aubin
parent e28c618e67
commit 8af56c82ef
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ source /usr/share/yunohost/helpers
backup_dir="${1}/conf/ldap"
# Backup the configuration
ynh_backup "/etc/ldap/slapd.conf" "${backup_dir}/slapd.conf"
ynh_backup "/etc/ldap/ldap.conf" "${backup_dir}/ldap.conf"
slapcat -b cn=config -l "${backup_dir}/cn=config.master.ldif"
# Backup the database

View file

@ -39,7 +39,7 @@ else
# Restore the configuration
mv /etc/ldap/slapd.d "$TMPDIR"
mkdir -p /etc/ldap/slapd.d
cp -a "${backup_dir}/slapd.conf" /etc/ldap/slapd.conf
cp -a "${backup_dir}/ldap.conf" /etc/ldap/ldap.conf
slapadd -F /etc/ldap/slapd.d -b cn=config \
-l "${backup_dir}/cn=config.master.ldif" \
|| die 1 "Unable to restore LDAP configuration"