2020-12-16 19:56:57 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
|
|
#=================================================
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_script_progression "Upgrading source files..."
|
|
|
|
|
|
|
|
ynh_setup_source --dest_dir="$install_dir" --keep="data"
|
2020-12-16 19:56:57 +01:00
|
|
|
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_safe_rm "$install_dir/data/viewcache/*"
|
2020-12-16 19:56:57 +01:00
|
|
|
|
2023-03-23 15:26:20 +01:00
|
|
|
chmod -R o-rwx "$install_dir"
|
|
|
|
chown -R $app:www-data "$install_dir"
|
2021-05-27 13:19:07 +02:00
|
|
|
|
2020-12-16 19:56:57 +01:00
|
|
|
#=================================================
|
|
|
|
# NGINX CONFIGURATION
|
|
|
|
#=================================================
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_script_progression "Upgrading NGINX web server configuration..."
|
2020-12-16 19:56:57 +01:00
|
|
|
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_config_add_nginx
|
2020-12-16 19:56:57 +01:00
|
|
|
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_config_add_phpfpm
|
2020-12-16 19:56:57 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# MODIFY A CONFIG FILE
|
|
|
|
#=================================================
|
|
|
|
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_config_add --template="config-dist.php" --destination="$install_dir/data/config.php"
|
2020-12-16 19:56:57 +01:00
|
|
|
|
2024-06-24 11:25:39 +02:00
|
|
|
chmod 400 "$install_dir/data/config.php"
|
|
|
|
chown $app "$install_dir/data/config.php"
|
2020-12-16 19:56:57 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_script_progression "Upgrade of $app completed"
|