From 5d44c40fd249bdf81cc28aa349ea8b756dbc471a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 9 Sep 2021 11:36:07 +0200 Subject: [PATCH] Fix --- hooks/post_user_create | 2 +- hooks/post_user_delete | 2 +- scripts/install | 7 ++----- scripts/upgrade | 7 ++----- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/hooks/post_user_create b/hooks/post_user_create index d47c60c..ab5efb9 100644 --- a/hooks/post_user_create +++ b/hooks/post_user_create @@ -1,5 +1,5 @@ #!/bin/bash -app=__APP__ +app=APPNAMETOCHANGE # Source YunoHost helpers source /usr/share/yunohost/helpers diff --git a/hooks/post_user_delete b/hooks/post_user_delete index 7ac041d..f5a6eae 100644 --- a/hooks/post_user_delete +++ b/hooks/post_user_delete @@ -1,5 +1,5 @@ #!/bin/bash -app=__APP__ +app=APPNAMETOCHANGE # Source YunoHost helpers source /usr/share/yunohost/helpers diff --git a/scripts/install b/scripts/install index 0d51920..a3d16db 100644 --- a/scripts/install +++ b/scripts/install @@ -159,11 +159,8 @@ chmod 644 "/etc/cron.d/$app" #================================================= ynh_script_progression --message="Adapting hooks..." --weight=1 -#ynh_replace_string --match_string="APPNAMETOCHANGE" --replace_string="$app" --target_file="../hooks/post_user_create" -#ynh_replace_string --match_string="APPNAMETOCHANGE" --replace_string="$app" --target_file="../hooks/post_user_delete" - -ynh_add_config --template="../hooks/post_user_create" --destination="../hooks/post_user_create" -ynh_add_config --template="../hooks/post_user_create" --destination="../hooks/post_user_create" +ynh_replace_string --match_string="APPNAMETOCHANGE" --replace_string="$app" --target_file="../hooks/post_user_create" +ynh_replace_string --match_string="APPNAMETOCHANGE" --replace_string="$app" --target_file="../hooks/post_user_delete" #================================================= # SETUP SSOWAT diff --git a/scripts/upgrade b/scripts/upgrade index 925e41e..2b52f6f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -192,11 +192,8 @@ chmod 644 "/etc/cron.d/$app" #================================================= ynh_script_progression --message="Adapting hooks..." --weight=1 -#ynh_replace_string --match_string="APPNAMETOCHANGE" --replace_string=$app --target_file="../hooks/post_user_create" -#ynh_replace_string --match_string="APPNAMETOCHANGE" --replace_string=$app --target_file="../hooks/post_user_delete" - -ynh_add_config --template="../hooks/post_user_create" --destination="../hooks/post_user_create" -ynh_add_config --template="../hooks/post_user_create" --destination="../hooks/post_user_create" +ynh_replace_string --match_string="APPNAMETOCHANGE" --replace_string=$app --target_file="../hooks/post_user_create" +ynh_replace_string --match_string="APPNAMETOCHANGE" --replace_string=$app --target_file="../hooks/post_user_delete" #================================================= # RELOAD NGINX