From 8498b76e20196935413b527ddb9f73e2ad28d63e 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 23:30:00 +0200 Subject: [PATCH] cleaning --- scripts/backup | 8 +------- scripts/upgrade | 18 ++++-------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/scripts/backup b/scripts/backup index 45a6474..3badad1 100755 --- a/scripts/backup +++ b/scripts/backup @@ -28,17 +28,11 @@ ynh_backup --src_path="$install_dir" ynh_backup --src_path="$data_dir" --is_big #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1126b63..9690e37 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) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -27,15 +21,11 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=3 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=3 - - mkdir -p $install_dir/bin - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" -fi +mkdir -p $install_dir/bin +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" chown -R $app:www-data "$install_dir" chmod +x $install_dir/{kiwix-manage,kiwix-serve,kiwix-search}