diff --git a/scripts/_common.sh b/scripts/_common.sh index 7095589..f0ac8bb 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,7 +8,7 @@ PKG_DIR=$(cd ../; pwd) YNH_PHP_VERSION="7.3" -pkg_dependencies="php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-imap python-pip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-zip" +pkg_dependencies="php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-msql php${YNH_PHP_VERSION}-imap python-pip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-zlib" #================================================= # SPECIFIC HELPERS diff --git a/scripts/upgrade b/scripts/upgrade index 90e2ad3..24df8aa 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,16 +104,17 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # Backup config, plugins and themes and delete previous files -ynh_keep_if_no_upgrade plugins/* -ynh_keep application/config/config.php -ynh_keep upload +#ynh_keep_if_no_upgrade plugins/* +#ynh_keep application/config/config.php +#ynh_keep upload -# Copie new files and restore config, plugins, upload and themes -ynh_secure_remove $final_path -ynh_setup_source "$final_path" # Télécharge la source, décompresse et copie dans $final_path +if [ "$upgrade_type" == "UPGRADE_APP" ] +then + ynh_script_progression --message="Upgrading source files..." --time --weight=1 -# Restore config, plugins and themes -ynh_restore_persistent + # Download, check integrity, uncompress and patch the source from app.src + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/plugins/* $final_path/application/config/config.php $final_path/upload" +fi chmod 750 "$final_path" chmod -R o-rwx "$final_path"