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

48 lines
1.4 KiB
Text
Raw Normal View History

2015-02-01 03:21:28 +01:00
#!/bin/bash
2019-05-29 21:34:42 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2015-02-01 03:21:28 +01:00
2019-05-29 21:34:42 +02:00
source _common.sh
source /usr/share/yunohost/helpers
2015-02-01 03:21:28 +01:00
2019-05-29 21:34:42 +02:00
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ]
2015-02-01 03:21:28 +01:00
then
2019-05-29 21:34:42 +02:00
ynh_script_progression --message="Upgrading source files..." --weight=9
# Download, check integrity, uncompress and patch the source from app.src
2023-06-12 19:18:10 +02:00
ynh_setup_source --dest_dir="$install_dir"
2015-02-01 03:21:28 +01:00
fi
2023-06-12 19:18:10 +02:00
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
2021-09-10 21:24:22 +02:00
2019-05-29 21:34:42 +02:00
#=================================================
# NGINX CONFIGURATION
#=================================================
2021-01-31 18:20:49 +01:00
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
2019-05-29 21:34:42 +02:00
# Create a dedicated nginx config
ynh_add_nginx_config
#=================================================
# END OF SCRIPT
#=================================================
2015-02-01 03:21:28 +01:00
2019-05-29 21:34:42 +02:00
ynh_script_progression --message="Upgrade of $app completed" --last