Moving to the post-regen part because the pre-regen part should touch as little as possible of the actual system config

This commit is contained in:
Alexandre Aubin 2019-08-03 21:00:44 +02:00 committed by GitHub
parent bae6fe86f3
commit 10f1651022
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,9 +31,6 @@ do_init_regen() {
do_pre_regen() { do_pre_regen() {
pending_dir=$1 pending_dir=$1
# Add openldap user in the ssl-cert group to let it access the certificate for TLS
sudo usermod -aG ssl-cert openldap
cd /usr/share/yunohost/templates/slapd cd /usr/share/yunohost/templates/slapd
# create needed directories # create needed directories
@ -79,6 +76,9 @@ do_post_regen() {
sudo chown -R openldap:openldap /etc/ldap/schema/ sudo chown -R openldap:openldap /etc/ldap/schema/
sudo chown -R openldap:openldap /etc/ldap/slapd.d/ sudo chown -R openldap:openldap /etc/ldap/slapd.d/
# Add openldap user in the ssl-cert group to let it access the certificate for TLS
sudo usermod -aG ssl-cert openldap
[ -z "$regen_conf_files" ] && exit 0 [ -z "$regen_conf_files" ] && exit 0
# check the slapd config file at first # check the slapd config file at first