#!/bin/bash source _common.sh source /usr/share/yunohost/helpers ynh_app_setting_set_default --key=php_upload_max_filesize --value=256M #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= ynh_script_progression "Ensuring downward compatibility..." ynh_app_setting_set_default --key=release_cycle --value=longterm #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression "Upgrading source files..." source_id_to_use="main" if [[ "$release_cycle" == "longterm" ]] then source_id_to_use="lts" fi ynh_setup_source --dest_dir="$install_dir" --source_id="$source_id_to_use" # Update database (cd "$install_dir" && ynh_exec_as_app php${php_version} --define apc.enable_cli=1 console.php database:update) #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= ynh_script_progression "Upgrading system configurations related to $app..." ynh_config_add_nginx ynh_config_add_phpfpm #================================================= # END OF SCRIPT #================================================= ynh_script_progression "Upgrade of $app completed"