1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/2FAuth_ynh.git synced 2024-09-03 20:36:18 +02:00
This commit is contained in:
Éric Gaspar 2024-06-17 14:59:02 +02:00
parent 3f61d15153
commit 199dfd6f4a
3 changed files with 3 additions and 14 deletions

View file

@ -5,7 +5,7 @@
#================================================= #=================================================
# Composer version # Composer version
YNH_COMPOSER_VERSION="2.5.8" YNH_COMPOSER_VERSION="2.7.7"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -26,10 +26,6 @@ ynh_backup --src_path="$install_dir"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#================================================= #=================================================

View file

@ -14,18 +14,11 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
email=$(ynh_user_get_info --username=$admin --key=mail) email=$(ynh_user_get_info --username=$admin --key=mail)
fpm_footprint="low"
fpm_free_footprint=0
fpm_usage="low"
#================================================= #=================================================
# STORE SETTINGS FROM MANIFEST # STORE SETTINGS FROM MANIFEST
#================================================= #=================================================
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
# key for the .env __KEY__ # key for the .env __KEY__
key=$(ynh_string_random --length=45 | base64) key=$(ynh_string_random --length=45 | base64)
ynh_app_setting_set --app=$app --key=key --value=$key ynh_app_setting_set --app=$app --key=key --value=$key
@ -46,7 +39,7 @@ chown -R $app:www-data "$install_dir"
#================================================= #=================================================
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint ynh_add_fpm_config
ynh_add_nginx_config ynh_add_nginx_config
@ -63,7 +56,7 @@ ynh_install_composer --install_args="--prefer-dist --no-scripts --no-dev"
ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_script_progression --message="Adding a configuration file..." --weight=1
# Setup application config # Setup application config
ynh_add_config --template=".env.example" --destination="$install_dir/.env" ynh_add_config --template=".env" --destination="$install_dir/.env"
chmod 640 "$install_dir/.env" chmod 640 "$install_dir/.env"
chown $app:$app "$install_dir/.env" chown $app:$app "$install_dir/.env"