mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Simplify the overly complex mess about fpm_usage, fpm_footprint ... and fpm_free_footprint doesn't seem to even be something used anywhere
This commit is contained in:
parent
f2829d02bc
commit
bee14c8972
5 changed files with 6 additions and 65 deletions
|
@ -120,7 +120,7 @@ ynh_app_config_validate() {
|
||||||
ynh_app_config_apply() {
|
ynh_app_config_apply() {
|
||||||
_ynh_app_config_apply
|
_ynh_app_config_apply
|
||||||
|
|
||||||
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
|
ynh_add_fpm_config
|
||||||
}
|
}
|
||||||
|
|
||||||
ynh_app_config_run $1
|
ynh_app_config_run $1
|
||||||
|
|
|
@ -1,33 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC START
|
|
||||||
#=================================================
|
|
||||||
# IMPORT GENERIC HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
source _ynh_mysql_connect_as.sh
|
source _ynh_mysql_connect_as.sh
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STORE SETTINGS FROM MANIFEST
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
maintenance_mode=0
|
maintenance_mode=0
|
||||||
fpm_footprint="high"
|
|
||||||
fpm_free_footprint=0
|
|
||||||
fpm_usage="medium"
|
|
||||||
phpflags="--define apc.enable_cli=1"
|
phpflags="--define apc.enable_cli=1"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STORE SETTINGS FROM MANIFEST
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode
|
ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode
|
||||||
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
|
|
||||||
ynh_app_setting_set --app=$app --key=phpflags --value=$phpflags
|
ynh_app_setting_set --app=$app --key=phpflags --value=$phpflags
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -65,8 +45,9 @@ ynh_setup_source --dest_dir="$install_dir"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=5
|
ynh_script_progression --message="Configuring PHP-FPM..." --weight=5
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
ynh_app_setting_set --app=$app --key=fpm_footprint --value=high
|
||||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
|
ynh_app_setting_set --app=$app --key=fpm_usage --value=medium
|
||||||
|
ynh_add_fpm_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC START
|
|
||||||
#=================================================
|
|
||||||
# IMPORT GENERIC HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC START
|
|
||||||
#=================================================
|
|
||||||
# IMPORT GENERIC HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
source ../settings/scripts/_ynh_mysql_connect_as.sh
|
source ../settings/scripts/_ynh_mysql_connect_as.sh
|
||||||
|
@ -35,7 +29,7 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=50
|
||||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
# Recreate a dedicated php-fpm config
|
# Recreate a dedicated php-fpm config
|
||||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
|
ynh_add_fpm_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE NGINX CONFIGURATION
|
# RESTORE THE NGINX CONFIGURATION
|
||||||
|
|
|
@ -1,18 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC START
|
|
||||||
#=================================================
|
|
||||||
# IMPORT GENERIC HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK VERSION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
upgrade_type=$(ynh_check_app_version_changed)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -29,24 +19,6 @@ if [ -z "${maintenance_mode:-}" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode
|
ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If fpm_footprint doesn't exist, create it
|
|
||||||
if [ -z "${fpm_footprint:-}" ]; then
|
|
||||||
fpm_footprint=high
|
|
||||||
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If fpm_free_footprint doesn't exist, create it
|
|
||||||
if [ -z "${fpm_free_footprint:-}" ]; then
|
|
||||||
fpm_free_footprint=0
|
|
||||||
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If fpm_usage doesn't exist, create it
|
|
||||||
if [ -z "${fpm_usage:-}" ]; then
|
|
||||||
fpm_usage=medium
|
|
||||||
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If phpflags doesn't exist, create it
|
# If phpflags doesn't exist, create it
|
||||||
if [ -z "${phpflags:-}" ]; then
|
if [ -z "${phpflags:-}" ]; then
|
||||||
phpflags="--define apc.enable_cli=1"
|
phpflags="--define apc.enable_cli=1"
|
||||||
|
@ -64,7 +36,7 @@ fi
|
||||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
|
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
|
||||||
|
|
||||||
# Recreate a dedicated PHP-FPM config
|
# Recreate a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
|
ynh_add_fpm_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
|
Loading…
Add table
Reference in a new issue