From be417feeffa278be0e922a88f26df80826f54744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 10:39:21 +0200 Subject: [PATCH] cleaning --- scripts/backup | 10 ---------- scripts/upgrade | 21 ++++----------------- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/scripts/backup b/scripts/backup index c8931d8..92e3169 100755 --- a/scripts/backup +++ b/scripts/backup @@ -33,18 +33,8 @@ ynh_backup --src_path="$data_dir" --is_big ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# SPECIFIC BACKUP -#================================================= -# 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 145a290..be519c5 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,14 +21,10 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # 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" @@ -44,9 +34,7 @@ chmod +x "$install_dir/shiori" # MIGRATE AND UPGRADE #================================================= -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - if ynh_compare_current_package_version --comparison lt --version 1.50~ynh9 +if ynh_compare_current_package_version --comparison lt --version 1.50~ynh9 then ynh_script_progression --message="Migrating sqlite from version < 1.50~ynh9..." --weight=1 FTS4_EXISTS=$(sqlite3 "$data_dir/shiori.db" "SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'bookmark_content' AND sql LIKE '%USING fts4%';") @@ -71,7 +59,6 @@ then fi fi fi -fi #================================================= # REAPPLY SYSTEM CONFIGURATIONS