1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/piwigo_ynh.git synced 2024-09-03 20:06:03 +02:00

Update install

This commit is contained in:
Éric Gaspar 2024-06-07 09:02:52 +02:00
parent c9fa3069a3
commit 51fd24efed

View file

@ -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"