1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bookstack_ynh.git synced 2024-09-03 18:16:02 +02:00

Add admin

This commit is contained in:
ericgaspar 2022-01-28 11:33:16 +01:00
parent 12564bee75
commit dc1a24704b
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 15 additions and 0 deletions

View file

@ -2,6 +2,8 @@
; Manifest
domain="domain.tld"
path="/path"
admin="john"
password="1Strong-Password"
language="fr"
is_public=1
; Checks

View file

@ -40,6 +40,14 @@
"example": "/bookstack",
"default": "/bookstack"
},
{
"name": "admin",
"type": "user"
},
{
"name": "password",
"type": "password"
},
{
"name": "language",
"type": "string",

View file

@ -25,6 +25,9 @@ path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
language=$YNH_APP_ARG_LANGUAGE
phpversion=$YNH_PHP_VERSION
password=$YNH_APP_ARG_PASSWORD
admin=$YNH_APP_ARG_ADMIN
email=$(ynh_user_get_info --username=$admin --key=mail)
app=$YNH_APP_INSTANCE_NAME
@ -47,6 +50,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=language --value=$language
ynh_app_setting_set --app=$app --key=admin --value=$admin
#=================================================
# INSTALL DEPENDENCIES
@ -131,6 +135,7 @@ ynh_script_progression --message="Install BookStack" --weight=5
pushd $final_path
php$phpversion artisan key:generate --no-interaction --force
php$phpversion artisan migrate --no-interaction --force
php$phpversion artisan bookstack:create-admin --email="$email" --name="$admin" --password="$password"
popd
#=================================================