2022-01-10 13:37:52 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
|
|
#=================================================
|
2024-08-31 10:31:29 +02:00
|
|
|
ynh_script_progression "Upgrading source files..."
|
2022-01-10 13:37:52 +01:00
|
|
|
|
2024-08-31 10:31:29 +02:00
|
|
|
ynh_setup_source --dest_dir="$install_dir" --keep="data"
|
2022-01-10 13:37:52 +01:00
|
|
|
|
2023-03-10 12:48:48 +01:00
|
|
|
chmod g+w $install_dir/data/cache $install_dir/data/favicons $install_dir/data/logs $install_dir/data/thumbnails $install_dir/data/sqlite $install_dir/public
|
2022-01-10 13:37:52 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
2024-08-31 02:59:36 +02:00
|
|
|
ynh_script_progression "Upgrading PHP-FPM configuration..."
|
2022-01-10 13:37:52 +01:00
|
|
|
|
2024-08-31 02:59:36 +02:00
|
|
|
ynh_config_add_phpfpm
|
2022-01-10 13:37:52 +01:00
|
|
|
|
2024-08-31 02:59:36 +02:00
|
|
|
ynh_config_add_nginx
|
2022-12-23 23:08:29 +01:00
|
|
|
|
2022-01-10 13:37:52 +01:00
|
|
|
#=================================================
|
|
|
|
# UPDATE A CONFIG FILE
|
|
|
|
#=================================================
|
2024-08-31 02:59:36 +02:00
|
|
|
ynh_script_progression "Updating configuration..."
|
2022-01-10 13:37:52 +01:00
|
|
|
|
2024-08-31 02:59:36 +02:00
|
|
|
ynh_config_add --template="config.ini" --destination="$install_dir/config.ini"
|
2022-01-10 13:37:52 +01:00
|
|
|
|
2023-10-27 22:03:12 +02:00
|
|
|
#=================================================
|
|
|
|
# SETUP A CRON
|
|
|
|
#=================================================
|
2024-08-31 02:59:36 +02:00
|
|
|
ynh_script_progression "Setuping a cron..."
|
2023-10-27 22:03:12 +02:00
|
|
|
|
2024-08-31 02:59:36 +02:00
|
|
|
ynh_config_add --template="cron" --destination="/etc/cron.d/$app"
|
2023-10-27 22:03:12 +02:00
|
|
|
|
2022-01-10 13:37:52 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2024-08-31 02:59:36 +02:00
|
|
|
ynh_script_progression "Upgrade of $app completed"
|