From 6492f4702c2ca33bcc0a8a70a73b67757c6ad660 Mon Sep 17 00:00:00 2001 From: mastereur <22839524+mastereur@users.noreply.github.com> Date: Wed, 24 Mar 2021 22:32:43 +0100 Subject: [PATCH] Fix hook #50 --- scripts/install | 6 ++++-- scripts/upgrade | 10 ++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 818cc2f..0d3df0c 100644 --- a/scripts/install +++ b/scripts/install @@ -118,7 +118,7 @@ ynh_add_nginx_config finstall="$final_path/htdocs/install/install.forced.php" cp ../conf/install.forced.php "$finstall" -# Change variables in Wordpress configuration +# Change variables in Dolibarr configuration ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$finstall" ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$finstall" ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$finstall" @@ -129,7 +129,9 @@ then ynh_replace_string --match_string="modLdap" --replace_string="modLdap,modAdherent" --target_file="$finstall" fi -# Setup hooks +#================================================= +# CONFIGURE THE HOOK FILE FOR USER CREATE +#================================================= fhook=../hooks/post_user_create ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$fhook" ynh_replace_string --match_string="__MEMBER__" --replace_string="$member" --target_file="$fhook" diff --git a/scripts/upgrade b/scripts/upgrade index 95c70ac..7523316 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -212,6 +212,16 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --weight # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append +#================================================= +# UPDATE THE HOOK FILE FOR USER CREATE +#================================================= + +# Set system group in hooks +fhook=../hooks/post_user_create +ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$fhook" +ynh_replace_string --match_string="__MEMBER__" --replace_string="$member" --target_file="$fhook" +ynh_replace_string --match_string="__SRCPATH__" --replace_string="$final_path" --target_file="$fhook" + #================================================= # GENERIC FINALIZATION #=================================================