This commit is contained in:
Éric Gaspar 2023-06-08 17:27:51 +02:00 committed by Alexandre Aubin
parent 66481a81e0
commit 827eea2939
2 changed files with 31 additions and 2 deletions

View file

@ -30,6 +30,20 @@ source /usr/share/yunohost/helpers
# or 'example__2', '__3', ... for multi-instance installs)
#
#=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST
#=================================================
fpm_usage=low
fpm_footprint=low
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
#=================================================
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
#=================================================
@ -66,7 +80,7 @@ ynh_script_progression --message="Adding system configurations related to $app..
### - And the section "PHP-FPM CONFIGURATION" in the upgrade script
# Create a dedicated PHP-FPM config using the conf/php-fpm.conf or conf/extra_php-fpm.conf
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
# Create a dedicated NGINX config using the conf/nginx.conf template
ynh_add_nginx_config

View file

@ -55,6 +55,21 @@ upgrade_type=$(ynh_check_app_version_changed)
# ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir
#fi
### Use these functions if the package was released
### without "php fpm footprint" and you are implementing it
### Take values from 'install' script
#If fpm_footprint doesn't exist, create it
if [ -z "$fpm_footprint" ]; then
fpm_footprint=low
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
fi
# If fpm_usage doesn't exist, create it
if [ -z "$fpm_usage" ]; then
fpm_usage=low
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
fi
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
@ -88,7 +103,7 @@ ynh_script_progression --message="Upgrading system configurations related to $ap
# This should be a literal copypasta of what happened in the install's "System configuration" section
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
ynh_add_nginx_config