1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/snappymail_ynh.git synced 2024-09-03 20:26:29 +02:00

add password

This commit is contained in:
ericgaspar 2022-04-22 07:19:20 +02:00
parent b4831d4ba9
commit a4cdf6eb4a
3 changed files with 10 additions and 0 deletions

1
conf/admin_password.txt Normal file
View file

@ -0,0 +1 @@
__PASSWORD__

View file

@ -45,6 +45,11 @@
"name": "is_public",
"type": "boolean",
"default": true
},
,
{
"name": "password",
"type": "password"
}
]
}

View file

@ -27,6 +27,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
password=$YNH_APP_ARG_PASSWORD
app=$YNH_APP_INSTANCE_NAME
@ -48,6 +49,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=password --value="$password"
#=================================================
# INSTALL DEPENDENCIES
@ -111,6 +113,8 @@ ynh_add_fpm_config
mkdir -p "$final_path/data/_data_/_default_/configs/"
ynh_add_config --template="../conf/application.ini" --destination="$final_path/data/_data_/_default_/configs/application.ini"
ynh_add_config --template="../conf/admin_password.txt" --destination="$final_path/data/_data_/_default_/admin_password.txt"
#=================================================
# GENERIC FINALIZATION
#=================================================