From bcbe19644dc918e81031445d499fb2cbf29039eb Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Jul 2024 18:04:17 +0200 Subject: [PATCH] Trash the damn fpm_usage/fpm_footprint stuff --- config_panel.toml | 26 ------------------- scripts/config | 63 ----------------------------------------------- scripts/install | 2 -- 3 files changed, 91 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 4e458b6..ce7e3ca 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -19,29 +19,3 @@ name = "Nextcloud configuration" type = "boolean" yes = "yes" 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.
medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.
high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding." diff --git a/scripts/config b/scripts/config index febc454..134df7b 100644 --- a/scripts/config +++ b/scripts/config @@ -10,7 +10,6 @@ ynh_abort_if_errors #================================================= 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 @@ -37,29 +36,6 @@ get__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 #================================================= @@ -85,45 +61,6 @@ set__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 diff --git a/scripts/install b/scripts/install index 3436805..2d5d15e 100755 --- a/scripts/install +++ b/scripts/install @@ -33,8 +33,6 @@ ynh_setup_source --dest_dir="$install_dir" #================================================= 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 #=================================================