1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/blogotext_ynh.git synced 2024-09-03 18:15:52 +02:00
blogotext_ynh/scripts/upgrade

57 lines
1.6 KiB
Text
Raw Normal View History

2018-01-24 20:18:53 +01:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
2021-08-16 12:16:15 +02:00
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
2018-01-24 20:18:53 +01:00
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
2021-08-16 12:16:15 +02:00
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config/settings.php"
2021-08-16 12:16:15 +02:00
fi
2023-10-15 14:03:13 +02:00
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
2018-01-24 20:18:53 +01:00
#=================================================
# NGINX CONFIGURATION
#=================================================
2020-12-07 12:03:27 +01:00
ynh_script_progression --message="Upgrading NGINX web server configuration..."
2018-01-24 20:18:53 +01:00
2020-12-07 12:03:27 +01:00
# Create a dedicated NGINX config
2018-01-24 20:18:53 +01:00
ynh_add_nginx_config
2020-12-07 12:03:27 +01:00
# Create a dedicated PHP-FPM config
2018-01-24 20:18:53 +01:00
ynh_add_fpm_config
#=================================================
# SPECIFIC UPGRADE
#=================================================
2023-10-15 14:03:13 +02:00
ynh_backup_if_checksum_is_different "$install_dir/CONFIG_FILE"
2018-01-24 20:18:53 +01:00
2019-03-09 10:14:08 +01:00
#=================================================
# END OF SCRIPT
#=================================================
2020-12-07 11:54:33 +01:00
ynh_script_progression --message="Upgrade of $app completed"