From 418e8ffc7abdbe03a16816c42378e61654a403b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:22:07 +0200 Subject: [PATCH] Update upgrade --- scripts/upgrade | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0ed8ea6..45ad19b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,12 +17,6 @@ timezone="$(cat /etc/timezone)" secret=$(ynh_string_random --length=32) redis_db=$(ynh_redis_get_free_db) -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -96,21 +90,17 @@ ynh_systemd_action --service_name=$app --action=stop --log_path=systemd #================================================= # 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 - - # Frontend - ynh_setup_source --dest_dir="$install_dir" --source_id="front" +# Frontend +ynh_setup_source --dest_dir="$install_dir" --source_id="front" - # Backend - mkdir -p "$backend_path/files" - tempdir="$(mktemp -d)" - ynh_setup_source --dest_dir=$tempdir --source_id="back" - back="$(find $tempdir -name "vikunja-*" \! -name "*.sha256")" - cp "$back" "$backend_path/vikunja" -fi +# Backend +mkdir -p "$backend_path/files" +tempdir="$(mktemp -d)" +ynh_setup_source --dest_dir=$tempdir --source_id="back" +back="$(find $tempdir -name "vikunja-*" \! -name "*.sha256")" +cp "$back" "$backend_path/vikunja" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir"