1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pytition_ynh.git synced 2024-09-03 20:16:08 +02:00
This commit is contained in:
Éric Gaspar 2023-04-27 19:29:20 +02:00 committed by Salamandar
parent fc89ec7c7b
commit 433e697778
2 changed files with 6 additions and 1 deletions

View file

@ -47,6 +47,9 @@ ram.runtime = "50M"
choices = ["fr", "en"] choices = ["fr", "en"]
default = "fr" default = "fr"
[install.admin]
type = "user"
[install.password] [install.password]
help.en = "Administrator password" help.en = "Administrator password"
help.fr = "Mot de passe administrateur" help.fr = "Mot de passe administrateur"

View file

@ -9,6 +9,8 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
email=$(ynh_user_get_info --username=$admin --key=mail)
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
@ -87,7 +89,7 @@ ynh_exec_as $app bash -c "
python3 manage.py collectstatic python3 manage.py collectstatic
python3 manage.py compilemessages python3 manage.py compilemessages
DJANGO_SUPERUSER_PASSWORD='$password' \ 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" chmod 750 "$install_dir/static"