1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tiki_ynh.git synced 2024-09-04 01:15:54 +02:00
tiki_ynh/scripts/upgrade

45 lines
1.3 KiB
Text
Raw Normal View History

2022-05-22 20:54:12 +02:00
#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
ynh_app_setting_set_default --key=php_upload_max_filesize --value=256M
2022-05-22 20:54:12 +02:00
#=================================================
2023-03-01 15:15:43 +01:00
# ENSURE DOWNWARD COMPATIBILITY
2022-05-22 20:54:12 +02:00
#=================================================
ynh_script_progression "Ensuring downward compatibility..."
2022-05-22 20:54:12 +02:00
2024-08-31 15:36:19 +02:00
ynh_app_setting_set_default --key=release_cycle --value=longterm
2022-05-22 20:54:12 +02:00
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
2024-08-31 15:36:19 +02:00
ynh_script_progression "Upgrading source files..."
2022-05-22 20:54:12 +02:00
2024-08-31 15:36:19 +02:00
source_id_to_use="main"
if [[ "$release_cycle" == "longterm" ]]
2022-05-22 20:54:12 +02:00
then
2024-08-31 15:36:19 +02:00
source_id_to_use="lts"
2022-05-22 20:54:12 +02:00
fi
2024-08-31 15:36:19 +02:00
ynh_setup_source --dest_dir="$install_dir" --source_id="$source_id_to_use"
2023-06-24 00:57:17 +02:00
# Update database
(cd "$install_dir" && ynh_exec_as_app php${php_version} --define apc.enable_cli=1 console.php database:update)
2023-06-24 00:57:17 +02:00
2022-05-22 20:54:12 +02:00
#=================================================
2024-08-31 15:36:19 +02:00
# REAPPLY SYSTEM CONFIGURATIONS
2022-05-22 20:54:12 +02:00
#=================================================
2024-08-31 15:36:19 +02:00
ynh_script_progression "Upgrading system configurations related to $app..."
2022-05-22 20:54:12 +02:00
ynh_config_add_nginx
2022-05-22 20:54:12 +02:00
ynh_config_add_phpfpm
2022-05-22 20:54:12 +02:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Upgrade of $app completed"