#!/bin/bash #================================================= # GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= source _common.sh source /usr/share/yunohost/helpers #================================================= # CHECK VERSION #================================================= upgrade_type=$(ynh_check_app_version_changed) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=4 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" fi chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 ynh_add_nginx_config ynh_add_fpm_config #================================================= # SPECIFIC UPGRADE #================================================= ynh_script_progression --message="Running specific upgrade..." --weight=1 # Copy Yunohost custom script to cheky folder and launch it cp yunohost_upgrade_cheky.php "$install_dir/others/update/" # Upgrade disable because http://releases.cheky.net/releases.php no more exist #ynh_exec_as "$app" /usr/bin/php$phpversion $install_dir/others/update/yunohost_upgrade_cheky.php $install_dir #================================================= # END OF SCRIPT #================================================= ynh_script_progression --message="Upgrade of $app completed" --last