2019-12-30 10:19:54 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-11-19 21:46:31 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2019-12-30 10:19:54 +01:00
|
|
|
#=================================================
|
|
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
|
|
#=================================================
|
2024-01-13 12:13:28 +01:00
|
|
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
2019-12-30 10:19:54 +01:00
|
|
|
|
2024-01-13 12:13:28 +01:00
|
|
|
# Download, check integrity, uncompress and patch the source from app.src
|
|
|
|
ynh_setup_source --dest_dir="$install_dir" --keep="$install_dir/config.php"
|
2019-12-30 10:19:54 +01:00
|
|
|
|
2024-01-13 12:13:28 +01:00
|
|
|
chmod -R o-rwx "$install_dir"
|
|
|
|
chown -R "$app:www-data" "$install_dir"
|
2019-12-30 10:19:54 +01:00
|
|
|
|
|
|
|
#=================================================
|
2024-01-13 12:13:28 +01:00
|
|
|
# REAPPLY SYSTEM CONFIGURATIONS
|
2019-12-30 10:19:54 +01:00
|
|
|
#=================================================
|
2024-01-13 12:13:28 +01:00
|
|
|
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
|
2021-11-19 21:46:31 +01:00
|
|
|
|
|
|
|
# Create a dedicated NGINX config
|
|
|
|
ynh_add_nginx_config
|
2019-12-30 10:19:54 +01:00
|
|
|
|
2021-11-19 21:46:31 +01:00
|
|
|
# Create a dedicated PHP-FPM config
|
|
|
|
ynh_add_fpm_config
|
2019-12-30 10:19:54 +01:00
|
|
|
|
2021-11-19 21:46:31 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2019-12-30 10:19:54 +01:00
|
|
|
|
2021-11-19 22:24:38 +01:00
|
|
|
ynh_script_progression --message="Upgrade of $app completed" --last
|