1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/shiori_ynh.git synced 2024-09-03 20:26:17 +02:00
This commit is contained in:
Éric Gaspar 2024-06-08 10:39:21 +02:00
parent 47ccf479f1
commit be417feeff
2 changed files with 4 additions and 27 deletions

View file

@ -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"
#=================================================

View file

@ -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