1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/snappymail_ynh.git synced 2024-09-03 20:26:29 +02:00

Merge pull request #96 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2023-02-19 13:37:14 +01:00 committed by GitHub
commit c3534084b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 22 additions and 79 deletions

View file

@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Simple, modern, lightweight & fast web-based email client. The drastically upgraded & secured fork of RainLoop Webmail Community edition.
**Shipped version:** 2.26.1~ynh1
**Shipped version:** 2.26.2~ynh1
**Demo:** https://snappymail.eu/demo/

View file

@ -19,7 +19,7 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Simple, modern, lightweight & fast web-based email client. The drastically upgraded & secured fork of RainLoop Webmail Community edition.
**Version incluse :** 2.26.1~ynh1
**Version incluse :** 2.26.2~ynh1
**Démo :** https://snappymail.eu/demo/

View file

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

View file

@ -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.1~ynh1"
version = "2.26.2~ynh1"
maintainers = ["eric_G"]
@ -17,8 +17,8 @@ admindoc = "https://github.com/the-djmaze/snappymail/wiki"
code = "https://github.com/the-djmaze/snappymail"
[integration]
yunohost = ">= 11.1.6"
architectures = ["amd64", "arm64"]
yunohost = ">= 11.1.7"
architectures = "all"
multi_instance = true
ldap = false
sso = false

View file

@ -19,16 +19,6 @@ old_path=$YNH_APP_OLD_PATH
new_domain=$YNH_APP_NEW_DOMAIN
new_path=$YNH_APP_NEW_PATH
app=$YNH_APP_INSTANCE_NAME
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..." --weight=1
# Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
#=================================================

View file

@ -20,7 +20,6 @@ fpm_usage="low"
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
ynh_script_progression --message="Storing installation settings..." --weight=1
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
@ -34,33 +33,21 @@ 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 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# PHP-FPM CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
ynh_script_progression --message="Adding system configurations related to $app ..." --weight=3
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
# Use logrotate to manage application logfile(s)
ynh_use_logrotate

View file

@ -10,25 +10,15 @@ source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# REMOVE LOGROTATE CONFIGURATION
# REMOVE SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Removing logrotate configuration..." --weight=1
# Remove the app-specific logrotate config
ynh_remove_logrotate
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the dedicated NGINX config
ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1
# Remove the app-specific logrotate config
ynh_remove_logrotate
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config

View file

@ -17,40 +17,28 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$install_dir"
# Set permissions to app files
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=4
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
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX AND PHP-FPM
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
#=================================================
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload

View file

@ -50,33 +50,21 @@ then
ynh_setup_source --dest_dir="$install_dir" --keep="data/_data_/_default_/configs/application.ini"
fi
# Set permissions to app files
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# PHP-FPM CONFIGURATION
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=5
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append