From f0e43603b293f0dee6b61f865f3e683b55a354db Mon Sep 17 00:00:00 2001 From: rodinux Date: Mon, 19 Aug 2024 02:05:55 +0200 Subject: [PATCH] try add post-install --- manifest.toml | 27 +++++++++++++++++++++++++++ scripts/install | 16 +++++++++++++--- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 2f46f4b..f4a9d95 100644 --- a/manifest.toml +++ b/manifest.toml @@ -34,6 +34,33 @@ ram.runtime = "50M" type = "group" default = "visitors" + [install.country] + ask.fr = "Nom de l'association" + type = "string" + choices.France = "France" + choices.Belgique = "Belgique" + choices.Suisse = "Suisse" + + [install.name] + ask.fr = "Nom de l'association" + type = "string" + + [install.user_name] + ask.fr = "Nom et Prénom" + type = "string" + + [install.user_email] + ask.fr = "Adresse E-Mail" + type = "string" + + [install.password] + ask.fr="Mot de passe" + type = "password" + + [install.password_confirmed] + ask.fr="Encore le mot de passe (vérification)" + type = "password" + [resources] [resources.sources.main] url = "https://fossil.kd2.org/paheko/uv/paheko-1.3.11.tar.gz" diff --git a/scripts/install b/scripts/install index 3330730..12c8a42 100644 --- a/scripts/install +++ b/scripts/install @@ -75,9 +75,19 @@ chown $app:$app "$install_dir/config.local.php" ### so we're going to use curl to automatically fill the fields and submit the ### forms. -# Installation with curl -#ynh_script_progression --message="Finalizing installation..." --weight=1 -#ynh_local_curl "/INSTALL_PATH" "key1=value1" "key2=value2" "key3=value3" +# Post-Installation with curl +ynh_script_progression --message="Finalizing installation..." --weight=1 + +installUrl="/var/www/paheko/www/admin/install.php?submit" + +country=$country +name=$name +user_name=$user_name +user_email=$user_email +password=$password +password_confirmed=$password_confirmed + +ynh_local_curl $installUrl "country=$country" "name=$name" "user_name=$user_name" "user_email=$user_email" "password=$password" "password_confirmed=$password_confirmed" #https://paheko.rodinux.fr/admin/install.php --args="country=FR&name=toto&user_name=bob&user_email=bob@example.org&password=bopbidibopbopbop&password_confirmed=bopbidibopbopbop" #================================================= # END OF SCRIPT