1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mautic_ynh.git synced 2024-09-03 19:36:26 +02:00
mautic_ynh/scripts/upgrade

60 lines
1.7 KiB
Text
Raw Normal View History

2021-03-16 17:58:14 +01:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
2021-07-22 13:47:30 +02:00
timezone="$(cat /etc/timezone)"
2022-12-28 23:02:46 +01:00
2021-03-16 17:58:14 +01:00
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
2023-03-23 08:32:34 +01:00
ynh_setup_source --dest_dir="$install_dir"
2021-03-16 17:58:14 +01:00
fi
2023-03-23 08:32:34 +01:00
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
2021-05-29 19:06:03 +02:00
2023-03-23 08:32:34 +01:00
chmod -R g+w $install_dir/app/config/
chmod -R g+w $install_dir/media/files/
chmod -R g+w $install_dir/media/images/
chmod -R g+w $install_dir/translations/
2021-05-29 19:06:03 +02:00
2021-03-16 17:58:14 +01:00
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
# Create a dedicated PHP-FPM config
2023-09-13 22:50:58 +02:00
ynh_add_fpm_config
2021-03-16 17:58:14 +01:00
2022-10-02 15:03:25 +02:00
# Create a dedicated NGINX config
ynh_add_nginx_config
2021-03-16 17:58:14 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of $app completed" --last