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:
parent
c9fa3069a3
commit
51fd24efed
1 changed files with 4 additions and 0 deletions
|
@ -71,13 +71,17 @@ ynh_script_progression --message="Configuring LDAP plugin..." --weight=2
|
||||||
|
|
||||||
# Login with admin account
|
# Login with admin account
|
||||||
ynh_local_curl "/ws.php?format=json" "method=pwg.session.login" "username=$admin" "password=$password"
|
ynh_local_curl "/ws.php?format=json" "method=pwg.session.login" "username=$admin" "password=$password"
|
||||||
|
|
||||||
# Get session token
|
# Get session token
|
||||||
status=$(ynh_local_curl "/ws.php?format=json" "method=pwg.session.getStatus")
|
status=$(ynh_local_curl "/ws.php?format=json" "method=pwg.session.getStatus")
|
||||||
pwg_token=$(jq --raw-output .result.pwg_token <<< "$status")
|
pwg_token=$(jq --raw-output .result.pwg_token <<< "$status")
|
||||||
|
|
||||||
# Install the Ldap_Login plugin
|
# 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"
|
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
|
# 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"
|
ynh_local_curl "/ws.php?format=json" "method=pwg.plugins.performAction" "action=activate" "plugin=Ldap_Login" "pwg_token=$pwg_token"
|
||||||
|
|
||||||
# Log out
|
# Log out
|
||||||
ynh_local_curl "/ws.php?format=json" "method=pwg.session.logout"
|
ynh_local_curl "/ws.php?format=json" "method=pwg.session.logout"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue