#!/bin/bash source _common.sh source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= ynh_script_progression "Loading settings..." email=$(ynh_user_get_info --username=$admin --key=mail) #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= ynh_script_progression "Ensuring downward compatibility..." #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= # FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed if ynh_app_upstream_version_changed then ynh_script_progression "Upgrading source files..." # Move data to the data_dir if it's still in install_dir if [ ! -d "$data_dir/store" ] then ynh_exec_as_app mv $install_dir/store $data_dir/ ynh_exec_as_app mv $install_dir/cache $data_dir/ fi # Then we remove the previous install ynh_safe_rm $install_dir ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir/addon" --source_id="addons" # We restore what we previously saved ynh_exec_as_app ln -s $data_dir/store $install_dir/ ynh_exec_as_app ln -s $data_dir/cache $install_dir/ fi #================================================= # PHP-FPM CONFIGURATION #================================================= ynh_script_progression "Upgrading PHP-FPM configuration..." # Create a dedicated PHP-FPM config ynh_config_add_phpfpm # Create a dedicated NGINX config ynh_config_add_nginx #================================================= # COMPOSER #================================================= ynh_script_progression "Pulling in external libraries with Composer..." ynh_composer_install ynh_composer_exec install --no-dev #================================================= # UPDATE A CONFIG FILE #================================================= ynh_script_progression "Updating configuration..." timezone=$(