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"