From 1f161aea2d42a858ff78fb75bdf2613e1bcaa973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 10 Jul 2024 21:25:22 +0200 Subject: [PATCH] cleaning --- conf/nginx.conf | 2 +- ...ig_panel.toml => config_panel.toml.example | 0 scripts/install | 13 +----------- scripts/restore | 2 +- scripts/upgrade | 20 +------------------ 5 files changed, 4 insertions(+), 33 deletions(-) rename config_panel.toml => config_panel.toml.example (100%) diff --git a/conf/nginx.conf b/conf/nginx.conf index e8db4d8..6912550 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,7 +9,7 @@ location __PATH__/ { try_files $uri $uri/ __PATH__/index.php; location ~ [^/]\.php(/|$) { - # more_set_headers X-Cache $upstream_cache_status; + # more_set_headers "X-Cache: $upstream_cache_status"; # fastcgi_ignore_headers "Cache-Control" "Expires" "Set-Cookie"; # fastcgi_cache nginx_cache; # fastcgi_cache_valid any 7d; diff --git a/config_panel.toml b/config_panel.toml.example similarity index 100% rename from config_panel.toml rename to config_panel.toml.example diff --git a/scripts/install b/scripts/install index 542d81c..dbd60d3 100644 --- a/scripts/install +++ b/scripts/install @@ -7,17 +7,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# INITIALIZE AND STORE SETTINGS -#================================================= - -fpm_footprint="low" -fpm_free_footprint=0 -fpm_usage="low" -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" - #================================================= # CONFIGURING A POSTGRESQL DATABASE #================================================= @@ -72,7 +61,7 @@ chown -R "$app:www-data" "$install_dir" ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/scripts/restore b/scripts/restore index 022cfba..bc38387 100644 --- a/scripts/restore +++ b/scripts/restore @@ -34,7 +34,7 @@ ynh_script_progression --message="Restoring system configurations related to $ap ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # Recreate a dedicated PHP-FPM config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion +ynh_add_fpm_config ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index c039ebe..04df6c6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,24 +19,6 @@ ynh_systemd_action --service_name="$app" --action="stop" --log_path="systemd" #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -# 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_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 - ynh_app_setting_set --app="$app" --key=fpm_usage --value="$fpm_usage" -fi - if [ -f "$install_dir/config/db.inc.php" ]; then ynh_secure_remove --file="$install_dir/config/db.inc.php" fi @@ -89,7 +71,7 @@ COMPOSER_ALLOW_SUPERUSER=1 ynh_exec_warn_less ynh_composer_exec --commands="movi ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage="$fpm_usage" --footprint="$fpm_footprint" +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config