From e044480af945e123545be5744a1c2016ceff1fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 20 May 2024 07:46:19 +0200 Subject: [PATCH] cleaning --- scripts/backup | 10 +--------- scripts/upgrade | 10 ++-------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/scripts/backup b/scripts/backup index 511c97b..e21c492 100755 --- a/scripts/backup +++ b/scripts/backup @@ -21,21 +21,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 LOGROTATE -#================================================= - ynh_backup --src_path="/etc/logrotate.d/$app" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6d5c9a2..1b3150c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -3,8 +3,6 @@ source _common.sh source /usr/share/yunohost/helpers -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -24,13 +22,9 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 - - ynh_setup_source --dest_dir="$install_dir" --full_replace=1 -fi +ynh_setup_source --dest_dir="$install_dir" --full_replace=1 chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir"