1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wemawema_ynh.git synced 2024-10-01 13:34:56 +02:00
wemawema_ynh/scripts/upgrade

49 lines
1.4 KiB
Text
Raw Normal View History

2017-10-28 19:28:51 +02:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
2017-10-28 19:28:51 +02:00
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=3
# Download, check integrity, uncompress and patch the source from app.src
2023-05-07 18:50:05 +02:00
ynh_setup_source --dest_dir="$install_dir"
fi
2017-10-28 19:28:51 +02:00
2021-06-02 22:38:01 +02:00
# Set right permissions for curl installation
2023-05-07 18:50:05 +02:00
chmod 750 $install_dir
chown -R www-data: $install_dir
2021-06-02 22:38:01 +02:00
2017-10-28 19:28:51 +02:00
#=================================================
# NGINX CONFIGURATION
#=================================================
2020-11-17 09:08:16 +01:00
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
2017-10-28 19:28:51 +02:00
2020-11-17 09:08:16 +01:00
# Create a dedicated NGINX config
2017-10-28 19:28:51 +02:00
ynh_add_nginx_config
#=================================================
# END OF SCRIPT
#=================================================
2017-10-28 19:28:51 +02:00
ynh_script_progression --message="Upgrade of $app completed" --last