1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hydrogen_ynh.git synced 2024-09-03 19:26:17 +02:00
hydrogen_ynh/scripts/upgrade
Éric Gaspar d2f5be65bc cleaning
2024-08-20 22:19:51 +02:00

37 lines
1.2 KiB
Bash

#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression "Ensuring downward compatibility..."
# If default_server doesn't exist, create it
if [ -z "$default_server" ]; then
default_server="matrix.org"
ynh_app_setting_set --key=default_server --value=$default_server
fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --full_replace
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression "Upgrading NGINX web server configuration..."
# Create a dedicated NGINX config
ynh_config_add_nginx
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Upgrade of $app completed"