mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Update data/hooks/conf_regen/06-slapd
Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
parent
e6a52f09bd
commit
c0d3a361e3
1 changed files with 7 additions and 16 deletions
|
@ -54,27 +54,18 @@ do_pre_regen() {
|
||||||
echo "$backup_dir" > "$tmp_backup_dir_file"
|
echo "$backup_dir" > "$tmp_backup_dir_file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# remove legacy configuration file
|
|
||||||
if [ -f /etc/ldap/slapd-yuno.conf ]; then
|
|
||||||
mkdir -p ${pending_dir}/etc/ldap
|
|
||||||
touch "${pending_dir}/etc/ldap/slapd-yuno.conf"
|
|
||||||
fi
|
|
||||||
if [ -f /etc/ldap/slapd.conf ]; then
|
|
||||||
mkdir -p ${pending_dir}/etc/ldap
|
|
||||||
touch "${pending_dir}/etc/ldap/slapd.conf"
|
|
||||||
fi
|
|
||||||
if [ -f /etc/ldap/schema/yunohost.schema ]; then
|
|
||||||
mkdir -p ${pending_dir}/etc/ldap/schema
|
|
||||||
touch "${pending_dir}/etc/ldap/schema/yunohost.schema"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/slapd
|
|
||||||
|
|
||||||
# create needed directories
|
# create needed directories
|
||||||
ldap_dir="${pending_dir}/etc/ldap"
|
ldap_dir="${pending_dir}/etc/ldap"
|
||||||
schema_dir="${ldap_dir}/schema"
|
schema_dir="${ldap_dir}/schema"
|
||||||
mkdir -p "$ldap_dir" "$schema_dir"
|
mkdir -p "$ldap_dir" "$schema_dir"
|
||||||
|
|
||||||
|
# remove legacy configuration file
|
||||||
|
[ ! -f /etc/ldap/slapd-yuno.conf ] || touch "${ldap_dir}/slapd-yuno.conf"
|
||||||
|
[ ! -f /etc/ldap/slapd.conf ] || touch "${ldap_dir}/slapd.conf"
|
||||||
|
[ ! -f /etc/ldap/schema/yunohost.schema ] || touch "${schema_dir}/yunohost.schema"
|
||||||
|
|
||||||
|
cd /usr/share/yunohost/templates/slapd
|
||||||
|
|
||||||
# copy configuration files
|
# copy configuration files
|
||||||
cp -a ldap.conf slapd.ldif "$ldap_dir"
|
cp -a ldap.conf slapd.ldif "$ldap_dir"
|
||||||
cp -a sudo.ldif mailserver.ldif permission.ldif "$schema_dir"
|
cp -a sudo.ldif mailserver.ldif permission.ldif "$schema_dir"
|
||||||
|
|
Loading…
Add table
Reference in a new issue