From 433e697778f9f62e3415bf120b915a542d64212a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 27 Apr 2023 19:29:20 +0200 Subject: [PATCH] fix --- manifest.toml | 3 +++ scripts/install | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index c66cdb5..e1b0225 100644 --- a/manifest.toml +++ b/manifest.toml @@ -47,6 +47,9 @@ ram.runtime = "50M" choices = ["fr", "en"] default = "fr" + [install.admin] + type = "user" + [install.password] help.en = "Administrator password" help.fr = "Mot de passe administrateur" diff --git a/scripts/install b/scripts/install index a21c511..0ae3c85 100755 --- a/scripts/install +++ b/scripts/install @@ -9,6 +9,8 @@ source _common.sh source /usr/share/yunohost/helpers +email=$(ynh_user_get_info --username=$admin --key=mail) + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -87,7 +89,7 @@ ynh_exec_as $app bash -c " python3 manage.py collectstatic python3 manage.py compilemessages DJANGO_SUPERUSER_PASSWORD='$password' \ - python3 manage.py createsuperuser --noinput --username admin --email 'admin@$domain' + python3 manage.py createsuperuser --noinput --username $admin --email $email --password '$password' " chmod 750 "$install_dir/static"