From 1c1c954256b353779182b5fcc0ebdb345acf7ec0 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 26 Mar 2021 19:13:19 +0100 Subject: [PATCH] Use ynh_add_config helper for LDAP config --- scripts/install | 6 +----- scripts/upgrade | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index 99bcd95..a275de3 100644 --- a/scripts/install +++ b/scripts/install @@ -112,11 +112,7 @@ pushd "$final_path" exec_as $app touch user/accounts/admin.yaml popd -ynh_secure_remove "$final_path/user/plugins/login-ldap/login-ldap.yaml" -exec_as $app cp ../conf/login-ldap.yaml "$final_path/user/plugins/login-ldap/login-ldap.yaml" -ynh_replace_string "__ADMIN__" "$admin" "$final_path/user/plugins/login-ldap/login-ldap.yaml" -ynh_replace_string "__APP__" "$app" "$final_path/user/plugins/login-ldap/login-ldap.yaml" -exec_as $app cp "$final_path/user/plugins/login-ldap/login-ldap.yaml" "$final_path/user/config/plugins/login-ldap.yaml" +ynh_add_config --template="../conf/login-ldap.yaml" --destination="$final_path/user/config/plugins/login-ldap.yaml" #================================================= # CREATE A CRON TASK diff --git a/scripts/upgrade b/scripts/upgrade index a1fc630..d398ff2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -177,11 +177,7 @@ pushd "$final_path" exec_as $app touch user/accounts/admin.yaml popd -ynh_secure_remove "$final_path/user/plugins/login-ldap/login-ldap.yaml" -exec_as $app cp ../conf/login-ldap.yaml "$final_path/user/plugins/login-ldap/login-ldap.yaml" -ynh_replace_string "__ADMIN__" "$admin" "$final_path/user/plugins/login-ldap/login-ldap.yaml" -ynh_replace_string "__APP__" "$app" "$final_path/user/plugins/login-ldap/login-ldap.yaml" -exec_as $app cp "$final_path/user/plugins/login-ldap/login-ldap.yaml" "$final_path/user/config/plugins/login-ldap.yaml" +ynh_add_config --template="../conf/login-ldap.yaml" --destination="$final_path/user/config/plugins/login-ldap.yaml" #================================================= # CREATE A CRON TASK