From 702df1dc4369e7faf2419c7a251c1de520c44459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 30 Sep 2022 18:31:12 +0200 Subject: [PATCH] Testing (#159) * Update config.inc.php (#122) * Update manifest.json * Auto-update README * 1.5.1 (#124) * 1.5.1 * Add config panel (#128) * Plugin upgrade (#127) * Update plugins * Update config.inc.php * Update manifest.json * Auto-update README * Update remove * Update check_process * Update upgrade * 1.5.2 (#131) * 1.5.2 * Update config.inc.php (#134) * Fix plugins urls (#137) * fix plugins urls sblaisot/automatic_addressbook is abandonned and forked at projectmyst/automatic_addressbook * fix plugins urls as in previous commit * fix html5 plugin url * fix html5 plugin url * Auto-update README * Auto-update README * 1.5.3 (#142) * 1.5.3 * Auto-update README Co-authored-by: yunohost-bot * user * Update _common.sh * Update _common.sh * version 16 (#146) * Fix * Auto-update README * Update config.inc.php * Update config.inc.php * Update install * Update install * Update install * Update install * Update upgrade * PHP8.0 * Update app.src * Update restore Co-authored-by: Yunohost-Bot <> * bullseye (#149) * bullseye * Auto-update README * Update app.src * set max filesize * Fix Co-authored-by: yunohost-bot * Update manifest.json * Update upgrade * PHP7.4 * Update upgrade * Update _common.sh * Update upgrade * Install JS dependencies (#154) * INSTALL JS DEPENDENCIES * Update install * Update manifest.json * Auto-update README * Upgrade config panel (#158) * fix pgp home path in a muti-install context * Update manifest.json * config panel * fix * Update install * Update upgrade * Fix pgp home path in a muti-install context (#157) * fix pgp home path in a muti-install context * Update manifest.json * Update _common.sh Co-authored-by: Yunohost-Bot <> Co-authored-by: Xavier Brochard Co-authored-by: yunohost-bot Co-authored-by: SuNounix <91945628+SuNounix@users.noreply.github.com> --- conf/enigma.config.inc.php | 2 +- config_panel.toml | 17 +++++++++++------ manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/config | 10 +++++----- scripts/install | 11 +++++++++-- scripts/upgrade | 7 +++++++ 7 files changed, 35 insertions(+), 16 deletions(-) diff --git a/conf/enigma.config.inc.php b/conf/enigma.config.inc.php index 8990189..4d13f64 100644 --- a/conf/enigma.config.inc.php +++ b/conf/enigma.config.inc.php @@ -14,7 +14,7 @@ $config['enigma_debug'] = false; // REQUIRED! Keys directory for all users. // Must be writeable by PHP process, and not in the web server document root -$config['enigma_pgp_homedir'] = '__FINALPATH__/plugins/enigma/home'; +$config['enigma_pgp_homedir'] = '/var/www/__APP__/plugins/enigma/home'; // Location of gpg binary. By default it will be auto-detected. // This is also a way to force gpg2 use if there are both 1.x and 2.x on the system. diff --git a/config_panel.toml b/config_panel.toml index 61d6b6f..e18cff6 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -7,19 +7,24 @@ name = "Roundcube configuration" name = "PHP-FPM configuration" [main.php_fpm_config.fpm_footprint] - ask = "Memory footprint of the service?" - choices = ["low", "medium", "high", "specific"] + 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" - help = "low <= 20Mb per pool. medium between 20Mb and 40Mb per pool. high > 40Mb per pool.
Use specific to set a value with the following option." - [main.php_fpm_config.free_footprint] + [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 of the service?" + 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." + 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/manifest.json b/manifest.json index 3a79c1e..dd43a77 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open Source Webmail software", "fr": "Webmail Open Source" }, - "version": "1.6.0~ynh2", + "version": "1.6.0~ynh3", "url": "https://roundcube.net/", "upstream": { "license": "GPL-3.0-only", diff --git a/scripts/_common.sh b/scripts/_common.sh index 1433a9d..00f49a7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -15,7 +15,7 @@ YNH_COMPOSER_VERSION=2.3.7 # Plugins version contextmenu_version=3.3.1 automatic_addressbook_version=v0.4.3 -carddav_version=4.4.1 +carddav_version=4.4.3 #================================================= # EXPERIMENTAL HELPERS diff --git a/scripts/config b/scripts/config index 3440bd2..91c2de7 100644 --- a/scripts/config +++ b/scripts/config @@ -56,10 +56,10 @@ set__fpm_footprint() { fi } -set__free_footprint() { +set__fpm_free_footprint() { if [ "$fpm_footprint" = "specific" ] then - ynh_app_setting_set --app=$app --key=fpm_footprint --value="$free_footprint" + ynh_app_setting_set --app=$app --key=fpm_footprint --value="$fpm_free_footprint" fi } @@ -70,11 +70,11 @@ set__free_footprint() { ynh_app_config_validate() { _ynh_app_config_validate - if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[free_footprint]}" == "true" ]; then - # If fpm_footprint is set to 'specific', use $free_footprint value. + if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[fpm_free_footprint]}" == "true" ]; then + # If fpm_footprint is set to 'specific', use $fpm_free_footprint value. if [ "$fpm_footprint" = "specific" ] then - fpm_footprint=$free_footprint + fpm_footprint=$fpm_free_footprint fi if [ "$fpm_footprint" == "0" ] diff --git a/scripts/install b/scripts/install index c9d76fe..0ac4022 100644 --- a/scripts/install +++ b/scripts/install @@ -27,6 +27,10 @@ language=$YNH_APP_ARG_LANGUAGE app=$YNH_APP_INSTANCE_NAME +fpm_footprint="low" +fpm_free_footprint=0 +fpm_usage="low" + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -47,6 +51,9 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=with_carddav --value=$with_carddav ynh_app_setting_set --app=$app --key=language --value=$language +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 #================================================= # STANDARD MODIFICATIONS @@ -101,8 +108,8 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 -# Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +# Create a dedicated php-fpm config +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 488fb83..85e1acc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,6 +27,7 @@ language=$(ynh_app_setting_get --app=$app --key=language) db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) +fpm_free_footprint=$(ynh_app_setting_get --app=$app --key=fpm_free_footprint) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) #================================================= @@ -89,6 +90,12 @@ if [ -z "$fpm_footprint" ]; then 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=low