mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Trash the damn fpm_usage/fpm_footprint stuff
This commit is contained in:
parent
f9ead85cfe
commit
bcbe19644d
3 changed files with 0 additions and 91 deletions
|
@ -19,29 +19,3 @@ name = "Nextcloud configuration"
|
||||||
type = "boolean"
|
type = "boolean"
|
||||||
yes = "yes"
|
yes = "yes"
|
||||||
no = "no"
|
no = "no"
|
||||||
|
|
||||||
[main.php_fpm_config]
|
|
||||||
name = "PHP-FPM configuration"
|
|
||||||
|
|
||||||
[main.php_fpm_config.fpm_footprint]
|
|
||||||
ask = "Memory footprint"
|
|
||||||
type = "select"
|
|
||||||
choices.low = "Low, <= 20Mb per pool"
|
|
||||||
choices.medium = "Medium, between 20Mb and 40Mb per pool"
|
|
||||||
choices.high = "High, > 40Mb per pool"
|
|
||||||
choices.specific = "Use specific value"
|
|
||||||
default = "low"
|
|
||||||
|
|
||||||
[main.php_fpm_config.fpm_free_footprint]
|
|
||||||
visible = "fpm_footprint == 'specific'"
|
|
||||||
ask = "Memory footprint of the service?"
|
|
||||||
type = "number"
|
|
||||||
default = "0"
|
|
||||||
help = "Free field to specify exactly the footprint in Mb if you don't want to use one of the three previous values."
|
|
||||||
|
|
||||||
[main.php_fpm_config.fpm_usage]
|
|
||||||
ask = "Expected usage"
|
|
||||||
type = "select"
|
|
||||||
choices = ["low", "medium", "high"]
|
|
||||||
default = "low"
|
|
||||||
help = "low: Personal usage, behind the SSO. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.<br>medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.<br>high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding."
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
php_version=$(ynh_app_setting_get --key=php_version)
|
php_version=$(ynh_app_setting_get --key=php_version)
|
||||||
current_fpm_footprint=$(ynh_app_setting_get --key=fpm_footprint)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC GETTERS FOR TOML SHORT KEY
|
# SPECIFIC GETTERS FOR TOML SHORT KEY
|
||||||
|
@ -37,29 +36,6 @@ get__system_addressbook_exposed() {
|
||||||
php${php_version} --define apc.enable_cli=1 occ config:app:get dav system_addressbook_exposed)
|
php${php_version} --define apc.enable_cli=1 occ config:app:get dav system_addressbook_exposed)
|
||||||
}
|
}
|
||||||
|
|
||||||
get__fpm_footprint() {
|
|
||||||
# Free footprint value for php-fpm
|
|
||||||
# Check if current_fpm_footprint is an integer
|
|
||||||
if [ "$current_fpm_footprint" -eq "$current_fpm_footprint" ] 2> /dev/null
|
|
||||||
then
|
|
||||||
echo "specific"
|
|
||||||
else
|
|
||||||
echo "$current_fpm_footprint"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
get__fpm_free_footprint() {
|
|
||||||
# Free footprint value for php-fpm
|
|
||||||
# Check if current_fpm_footprint is an integer
|
|
||||||
if [ "$current_fpm_footprint" -eq "$current_fpm_footprint" ] 2> /dev/null
|
|
||||||
then
|
|
||||||
# If current_fpm_footprint is an integer, that's a numeric value for the footprint
|
|
||||||
echo "$current_fpm_footprint"
|
|
||||||
else
|
|
||||||
echo "0"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETTERS FOR TOML SHORT KEYS
|
# SPECIFIC SETTERS FOR TOML SHORT KEYS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -85,45 +61,6 @@ set__system_addressbook_exposed() {
|
||||||
ynh_print_info "System addressbook is exposed: $system_addressbook_exposed"
|
ynh_print_info "System addressbook is exposed: $system_addressbook_exposed"
|
||||||
}
|
}
|
||||||
|
|
||||||
#REMOVEME? Everything about fpm_footprint is removed in helpers2.1... | set__fpm_footprint() {
|
|
||||||
#REMOVEME? Everything about fpm_footprint is removed in helpers2.1... | if [ "$fpm_footprint" != "specific" ]
|
|
||||||
then
|
|
||||||
#REMOVEME? Everything about fpm_footprint is removed in helpers2.1... | ynh_app_setting_set --key=fpm_footprint --value="$fpm_footprint"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#REMOVEME? Everything about fpm_free_footprint is removed in helpers2.1... | set__fpm_free_footprint() {
|
|
||||||
#REMOVEME? Everything about fpm_footprint is removed in helpers2.1... | if [ "$fpm_footprint" = "specific" ]
|
|
||||||
then
|
|
||||||
#REMOVEME? Everything about fpm_free_footprint is removed in helpers2.1... | ynh_app_setting_set --key=fpm_footprint --value="$fpm_free_footprint"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_app_config_validate() {
|
|
||||||
_ynh_app_config_validate
|
|
||||||
|
|
||||||
if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[fpm_free_footprint]}" == "true" ]; then
|
|
||||||
#REMOVEME? Everything about fpm_free_footprint is removed in helpers2.1... | # If fpm_footprint is set to 'specific', use $fpm_free_footprint value.
|
|
||||||
#REMOVEME? Everything about fpm_footprint is removed in helpers2.1... | if [ "$fpm_footprint" = "specific" ]
|
|
||||||
then
|
|
||||||
#REMOVEME? Everything about fpm_free_footprint is removed in helpers2.1... | fpm_footprint=$fpm_free_footprint
|
|
||||||
fi
|
|
||||||
|
|
||||||
#REMOVEME? Everything about fpm_footprint is removed in helpers2.1... | if [ "$fpm_footprint" == "0" ]
|
|
||||||
then
|
|
||||||
ynh_print_warn "When selecting 'specific', you have to set a footprint value into the field below."
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
ynh_app_config_apply() {
|
|
||||||
_ynh_app_config_apply
|
|
||||||
|
|
||||||
ynh_config_add_phpfpm
|
|
||||||
}
|
|
||||||
|
|
||||||
ynh_app_config_run $1
|
ynh_app_config_run $1
|
||||||
|
|
|
@ -33,8 +33,6 @@ ynh_setup_source --dest_dir="$install_dir"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Configuring PHP-FPM..."
|
ynh_script_progression "Configuring PHP-FPM..."
|
||||||
|
|
||||||
ynh_app_setting_set --key=fpm_footprint --value=high
|
|
||||||
ynh_app_setting_set --key=fpm_usage --value=medium
|
|
||||||
ynh_config_add_phpfpm
|
ynh_config_add_phpfpm
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue