From fd6522218a9e481872bb7cd29f44bcfdedc74a86 Mon Sep 17 00:00:00 2001 From: mastereur <22839524+mastereur@users.noreply.github.com> Date: Wed, 7 Dec 2022 17:59:08 +0100 Subject: [PATCH] Remove last member option in files #88 --- hooks/post_user_create | 18 +++++++++--------- scripts/install | 6 +++--- scripts/upgrade | 1 - 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/hooks/post_user_create b/hooks/post_user_create index c240023..f25b005 100644 --- a/hooks/post_user_create +++ b/hooks/post_user_create @@ -1,7 +1,7 @@ #!/bin/bash app=__APP__ src_path=__FINALPATH__ -member=__MEMBER__ +# member=__MEMBER__ # Sync users if sudo php $src_path/scripts/user/sync_users_ldap2dolibarr.php commitiferror --server=localhost -y; then @@ -11,11 +11,11 @@ else fi # If YNH users should also be members, sync members -if [ $member -eq 1 ]; -then - if sudo php $src_path/scripts/members/sync_members_ldap2dolibarr.php commitiferror 1 --server=localhost -y; then - echo ldap member update ok - else - echo ldap member update ended with error - fi -fi +# if [ $member -eq 1 ]; +# then + # if sudo php $src_path/scripts/members/sync_members_ldap2dolibarr.php commitiferror 1 --server=localhost -y; then + # echo ldap member update ok + # else + # echo ldap member update ended with error + # fi +# fi diff --git a/scripts/install b/scripts/install index 5f72bf4..5d0e122 100644 --- a/scripts/install +++ b/scripts/install @@ -23,7 +23,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN -member=0 +#member=0 #is_public=0 phpversion=$YNH_PHP_VERSION @@ -49,7 +49,7 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin #ynh_app_setting_set --app=$app --key=is_public --value=$is_public -ynh_app_setting_set --app=$app --key=member --value=$member +#ynh_app_setting_set --app=$app --key=member --value=$member ynh_app_setting_set --app=$app --key=version --value=$(ynh_app_upstream_version "../manifest.json") #================================================= @@ -232,7 +232,7 @@ ynh_replace_string --match_string="dolibarr_main_authentication='dolibarr'" --re #================================================= 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="__MEMBER__" --replace_string="$member" --target_file="$fhook" ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$fhook" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2d34b7d..bc53361 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) -member=$(ynh_app_setting_get --app=$app --key=member) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) db_name=$(ynh_app_setting_get --app=$app --key=db_name)