From 8472da0efe94267f176b65ec96efb679c9ac082d Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 5 Apr 2021 13:57:11 +0200 Subject: [PATCH] bin/gpm has to be run from $final_path --- scripts/install | 4 +++- scripts/upgrade | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 6f16a83..97ab339 100644 --- a/scripts/install +++ b/scripts/install @@ -106,7 +106,9 @@ find "$final_path" -type d -exec chmod +s {} \; #================================================= ynh_script_progression --message="Installing and configuring LDAP plugin..." --weight=1 -exec_as $app php${YNH_PHP_VERSION} "$final_path/bin/gpm" install login-ldap --all-yes --no-interaction +pushd "$final_path" + exec_as $app php${YNH_PHP_VERSION} bin/gpm install login-ldap --no-interaction +popd exec_as $app mkdir -p "$final_path/user/config/plugins/login-ldap" exec_as $app touch "$final_path/user/accounts/admin.yaml" diff --git a/scripts/upgrade b/scripts/upgrade index f33ef7a..baa857d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -142,14 +142,18 @@ find "$final_path" -type d -exec chmod +s {} \; #================================================= ynh_script_progression --message="Updating all plugins..." --weight=1 -yes N | ynh_exec_warn_less exec_as $app php${YNH_PHP_VERSION} $final_path/bin/gpm update --all-yes --no-interaction +pushd "$final_path" + yes N | ynh_exec_warn_less exec_as $app php${YNH_PHP_VERSION} bin/gpm update --all-yes --no-interaction +popd #================================================= # INSTALL LDAP PLUGIN #================================================= ynh_script_progression --message="Installing and configuring LDAP plugin..." --weight=3 -exec_as $app php${YNH_PHP_VERSION} "$final_path/bin/gpm" install login-ldap --all-yes --no-interaction +pushd "$final_path" + exec_as $app php${YNH_PHP_VERSION} bin/gpm install login-ldap --no-interaction +popd exec_as $app mkdir -p "$final_path/user/config/plugins/login-ldap" exec_as $app touch "$final_path/user/accounts/admin.yaml"