diff --git a/conf/config.json b/conf/config.json index 5554238..2d4daca 100644 --- a/conf/config.json +++ b/conf/config.json @@ -27,7 +27,7 @@ "ldap_group_filter_mode": "0", "ldap_groupfilter_objectclass": "posixGroup", "ldap_host": "localhost", - "ldap_login_filter": "(&(|(objectclass=posixAccount))(uid=%uid)(permission=cn=nextcloud.main,ou=permission,dc=yunohost,dc=org))", + "ldap_login_filter": "(&(|(objectclass=posixAccount))(uid=%uid)(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))", "ldap_login_filter_mode": "0", "ldap_port": "389", "ldap_quota_attr": "userquota", diff --git a/scripts/install b/scripts/install index 7758382..47fe8e7 100755 --- a/scripts/install +++ b/scripts/install @@ -177,6 +177,7 @@ ynh_secure_remove --file="$nc_conf" nc_conf="$final_path/config.json" cp ../conf/config.json "$nc_conf" +ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$nc_conf" exec_occ config:import "$nc_conf" # Then remove the config file diff --git a/scripts/upgrade b/scripts/upgrade index 54f4258..8a63ab3 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -295,8 +295,7 @@ then nc_conf="${final_path}/config.json" cp ../conf/config.json "$nc_conf" - ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$nc_conf" - ynh_replace_string --match_string="__DATADIR__" --replace_string="$datadir" --target_file="$nc_conf" + ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$nc_conf" # Ensure that UpdateNotification app is disabled exec_occ app:disable updatenotification