Those single quotes were probably meant to be double quotes?

This commit is contained in:
Alexandre Aubin 2020-05-27 21:54:07 +02:00
parent 2bbff1d264
commit e28c618e67

View file

@ -101,18 +101,16 @@ do_post_regen() {
[ -z "$regen_conf_files" ] && exit 0
# check if a backup should be restored
backup_dir=$(cat "$tmp_backup_dir_file" 2>/dev/null || true)
# regenerate LDAP config directory from slapd.conf
echo "Regenerate LDAP config directory from slapd.ldif"
_regenerate_slapd_conf
# If there's a backup, re-import its data
backup_dir=$(cat "$tmp_backup_dir_file" 2>/dev/null || true)
if [[ -n "$backup_dir" && -f "${backup_dir}/dc=yunohost-dc=org.ldif" ]]; then
# regenerate LDAP config directory and import database as root
echo "Import the database using slapadd"
slapadd -F /etc/ldap/slapd.d -b dc=yunohost,dc=org \
-l '${backup_dir}/dc=yunohost-dc=org.ldif'
slapadd -F /etc/ldap/slapd.d -b dc=yunohost,dc=org -l "${backup_dir}/dc=yunohost-dc=org.ldif"
chown -R openldap:openldap /var/lib/ldap 2>&1
fi