1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/snappymail_ynh.git synced 2024-09-03 20:26:29 +02:00
This commit is contained in:
Éric Gaspar 2023-02-14 16:38:59 +01:00
parent c06ecb5ae2
commit 780e938365
6 changed files with 20 additions and 32 deletions

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/the-djmaze/snappymail/releases/download/v2.26.0/snappymail-2.26.0.tar.gz SOURCE_URL=https://github.com/the-djmaze/snappymail/releases/download/v2.26.1/snappymail-2.26.1.tar.gz
SOURCE_SUM=08d4f4de9aa4d2f887ca62dc9ae85bdb98a8f55ddc2f6f72df4073e1327d8c96 SOURCE_SUM=42b2c48fb866509d07666a87676b63e9576fa11f165157feab71c302e21f7914
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=false

View file

@ -7,7 +7,7 @@ location __PATH__/ {
index index.php; index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file # 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; try_files $uri $uri/ index.php;
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {

View file

@ -5,7 +5,7 @@ name = "SnappyMail"
description.en = "Simple, modern, lightweight & fast web-based e-mail client" description.en = "Simple, modern, lightweight & fast web-based e-mail client"
description.fr = "Client de messagerie Web simple, moderne, léger et rapide" 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"] maintainers = ["eric_G"]
@ -18,7 +18,7 @@ code = "https://github.com/the-djmaze/snappymail"
[integration] [integration]
yunohost = ">= 11.1.6" yunohost = ">= 11.1.6"
architectures = "all" architectures = ["amd64", "arm64"]
multi_instance = true multi_instance = true
ldap = false ldap = false
sso = false sso = false

View file

@ -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 # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" 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 # PHP-FPM CONFIGURATION
#================================================= #=================================================
@ -60,14 +64,6 @@ ynh_script_progression --message="Configuring log rotation..." --weight=1
# Use logrotate to manage application logfile(s) # Use logrotate to manage application logfile(s)
ynh_use_logrotate 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 # END OF SCRIPT
#================================================= #=================================================

View file

@ -17,6 +17,10 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$install_dir" 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 # 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" 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 # GENERIC FINALIZATION
#================================================= #=================================================

View file

@ -21,19 +21,19 @@ upgrade_type=$(ynh_check_app_version_changed)
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# If fpm_footprint doesn't exist, create it # If fpm_footprint doesn't exist, create it
if [ -z "$fpm_footprint" ]; then if [ -z "${fpm_footprint:-}" ]; then
fpm_footprint=low fpm_footprint=low
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
fi fi
# If fpm_free_footprint doesn't exist, create it # 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 fpm_free_footprint=0
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
fi fi
# If fpm_usage doesn't exist, create it # If fpm_usage doesn't exist, create it
if [ -z "$fpm_usage" ]; then if [ -z "${fpm_usage:-}" ]; then
fpm_usage=low fpm_usage=low
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
fi fi
@ -50,6 +50,10 @@ then
ynh_setup_source --dest_dir="$install_dir" --keep="data/_data_/_default_/configs/application.ini" ynh_setup_source --dest_dir="$install_dir" --keep="data/_data_/_default_/configs/application.ini"
fi fi
# Set permissions to app files
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
@ -76,14 +80,6 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --weight
# Use logrotate to manage app-specific logfile(s) # Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append 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 # END OF SCRIPT
#================================================= #=================================================