From 51fd24efed41a8edda95fc44564860fc5186d3ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 7 Jun 2024 09:02:52 +0200 Subject: [PATCH] Update install --- scripts/install | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/install b/scripts/install index 719d0af..b2c4495 100644 --- a/scripts/install +++ b/scripts/install @@ -71,13 +71,17 @@ ynh_script_progression --message="Configuring LDAP plugin..." --weight=2 # Login with admin account ynh_local_curl "/ws.php?format=json" "method=pwg.session.login" "username=$admin" "password=$password" + # Get session token status=$(ynh_local_curl "/ws.php?format=json" "method=pwg.session.getStatus") pwg_token=$(jq --raw-output .result.pwg_token <<< "$status") + # Install the Ldap_Login plugin ynh_local_curl "/ws.php?format=json" "method=pwg.plugins.performAction" "action=install" "plugin=Ldap_Login" "pwg_token=$pwg_token" + # Activate the Ldap_Login plugin ynh_local_curl "/ws.php?format=json" "method=pwg.plugins.performAction" "action=activate" "plugin=Ldap_Login" "pwg_token=$pwg_token" + # Log out ynh_local_curl "/ws.php?format=json" "method=pwg.session.logout"