From 780e938365301cbb8a8b15ede571e63bed8a0a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 16:38:59 +0100 Subject: [PATCH] 2.26.1 --- conf/app.src | 4 ++-- conf/nginx.conf | 2 +- manifest.toml | 4 ++-- scripts/install | 12 ++++-------- scripts/restore | 12 ++++-------- scripts/upgrade | 18 +++++++----------- 6 files changed, 20 insertions(+), 32 deletions(-) diff --git a/conf/app.src b/conf/app.src index d7dde08..35d4142 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/the-djmaze/snappymail/releases/download/v2.26.0/snappymail-2.26.0.tar.gz -SOURCE_SUM=08d4f4de9aa4d2f887ca62dc9ae85bdb98a8f55ddc2f6f72df4073e1327d8c96 +SOURCE_URL=https://github.com/the-djmaze/snappymail/releases/download/v2.26.1/snappymail-2.26.1.tar.gz +SOURCE_SUM=42b2c48fb866509d07666a87676b63e9576fa11f165157feab71c302e21f7914 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/nginx.conf b/conf/nginx.conf index b10af60..2dad80d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,7 +7,7 @@ location __PATH__/ { index index.php; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file - client_max_body_size 20M; + client_max_body_size 50M; try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { diff --git a/manifest.toml b/manifest.toml index de3feba..6445525 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "SnappyMail" description.en = "Simple, modern, lightweight & fast web-based e-mail client" description.fr = "Client de messagerie Web simple, moderne, léger et rapide" -version = "2.26.0~ynh1" +version = "2.26.1~ynh1" maintainers = ["eric_G"] @@ -18,7 +18,7 @@ code = "https://github.com/the-djmaze/snappymail" [integration] yunohost = ">= 11.1.6" -architectures = "all" +architectures = ["amd64", "arm64"] multi_instance = true ldap = false sso = false diff --git a/scripts/install b/scripts/install index 3d70da3..e676fb3 100755 --- a/scripts/install +++ b/scripts/install @@ -34,6 +34,10 @@ ynh_script_progression --message="Setting up source files..." --weight=3 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" +# Set permissions to app files +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -60,14 +64,6 @@ ynh_script_progression --message="Configuring log rotation..." --weight=1 # Use logrotate to manage application logfile(s) ynh_use_logrotate -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index b9327be..cc906df 100755 --- a/scripts/restore +++ b/scripts/restore @@ -17,6 +17,10 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" +# Set permissions to app files +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -41,14 +45,6 @@ ynh_script_progression --message="Restoring the logrotate configuration..." --we ynh_restore_file --origin_path="/etc/logrotate.d/$app" -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 0d24f31..0301cb9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,19 +21,19 @@ upgrade_type=$(ynh_check_app_version_changed) ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # If fpm_footprint doesn't exist, create it -if [ -z "$fpm_footprint" ]; then +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 +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 +if [ -z "${fpm_usage:-}" ]; then fpm_usage=low ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage fi @@ -50,6 +50,10 @@ then ynh_setup_source --dest_dir="$install_dir" --keep="data/_data_/_default_/configs/application.ini" fi +# Set permissions to app files +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -76,14 +80,6 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --weight # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # END OF SCRIPT #=================================================