From 6920ff5ef59352fd8f4c3773c3b2dae830274eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 May 2024 08:44:03 +0200 Subject: [PATCH] cleaning --- scripts/_common.sh | 1 + scripts/remove | 2 -- scripts/upgrade | 16 +++------------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 86f05db..07d6d1b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -35,6 +35,7 @@ build_fider() { cp -R favicon.png dist robots.txt ssr.js "$install_dir/app" popd || ynh_die chown "$app:www-data" -R "$install_dir/app" + ynh_remove_go } #================================================= diff --git a/scripts/remove b/scripts/remove index ce48465..aed91fb 100755 --- a/scripts/remove +++ b/scripts/remove @@ -34,8 +34,6 @@ ynh_remove_nginx_config ynh_remove_nodejs -ynh_remove_go - # Remove the log files ynh_secure_remove --file="/var/log/$app" diff --git a/scripts/upgrade b/scripts/upgrade index edbabba..33a3799 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 #================================================= @@ -43,14 +37,10 @@ fi #================================================= # 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 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir"