From 5624a88c91e3e59caefab080b5e68b57e518ae31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 26 May 2024 15:58:15 +0200 Subject: [PATCH] cleaning --- scripts/backup | 12 +----------- scripts/restore | 2 +- scripts/upgrade | 18 ++++-------------- 3 files changed, 6 insertions(+), 26 deletions(-) diff --git a/scripts/backup b/scripts/backup index 0f27135..b3c4ac3 100755 --- a/scripts/backup +++ b/scripts/backup @@ -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" #================================================= diff --git a/scripts/restore b/scripts/restore index 797fa49..17b8eb8 100755 --- a/scripts/restore +++ b/scripts/restore @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index f2cbe56..e90aa0f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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