1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grav_ynh.git synced 2024-09-03 19:16:01 +02:00

Use ynh_add_config helper for LDAP config

This commit is contained in:
tituspijean 2021-03-26 19:13:19 +01:00
parent defa321bb5
commit 1c1c954256
2 changed files with 2 additions and 10 deletions

View file

@ -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

View file

@ -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