diff --git a/scripts/install b/scripts/install index 171929e..ef6174c 100644 --- a/scripts/install +++ b/scripts/install @@ -3,6 +3,9 @@ source _common.sh source /usr/share/yunohost/helpers +# Gotta save the stupid password because we need it during upgrade because there's no way to trigger the upgrade.php script from command line ... +ynh_app_setting_set --app=$app --key=password --value="$password" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f2e320c..a97fed2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,8 +74,8 @@ ynh_add_nginx_config ynh_script_progression --message="Upgrading Piwigo with cURL..." --weight=6 # Upgrade Piwigo via cURL -# FIXME : Why Curl ... Why can't we trigger the migration from the command line somehow ... -#ynh_local_curl "/upgrade.php?language=$language&now=true" "language=$language" "username=$admin" "password=$admin_pwd" +# Why can't we trigger the migration from the command line somehow ... +ynh_local_curl "/upgrade.php?language=$language&now=true" "language=$language" "username=$admin" "password=$admin_pwd" #================================================= # CONFIGURE PIWIGO @@ -104,8 +104,8 @@ ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name <<< # Login with admin account -# FIXME: Is this stuff really needed ... isn't there a way to enable the damn LDAP login plugin from the command line or something ... -#ynh_local_curl "/ws.php?format=json" "method=pwg.session.login" "username=$admin" "password=$admin_pwd" +# ... isn't there a way to enable the damn LDAP login plugin from the command line or something ... +ynh_local_curl "/ws.php?format=json" "method=pwg.session.login" "username=$admin" "password=$admin_pwd" # Get session token status=$(ynh_local_curl "/ws.php?format=json" "method=pwg.session.getStatus") pwg_token=$(jq --raw-output .result.pwg_token <<< $status)