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 2024-05-26 15:58:15 +02:00
parent b071991cd1
commit 5624a88c91
3 changed files with 6 additions and 26 deletions

View file

@ -22,23 +22,13 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP LOGROTATE
#=================================================
ynh_backup --src_path="/etc/logrotate.d/$app"
#=================================================

View file

@ -23,7 +23,7 @@ chown -R $app:www-data "$install_dir"
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=4
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion

View file

@ -9,12 +9,6 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
@ -52,14 +46,10 @@ fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Upgrading source files..." --weight=5
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=5
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir/app" --keep="data/_data_/_default_/configs/application.ini"
fi
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir/app" --keep="data/_data_/_default_/configs/application.ini"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
@ -95,7 +85,7 @@ ynh_use_logrotate --non-append
#=================================================
ynh_script_progression --message="Applying SSO patch..." --weight=1
ynh_add_config --template="../conf/sso.php" --destination="$install_dir/index.php"
ynh_add_config --template="sso.php" --destination="$install_dir/index.php"
#=================================================
# END OF SCRIPT