From 634f6c9f058993c0c571cf83ea14b4f5c788619e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 27 Jul 2024 21:08:42 +0200 Subject: [PATCH] fix --- scripts/backup | 10 +--------- scripts/remove | 3 --- scripts/upgrade | 31 +++++++++++-------------------- 3 files changed, 12 insertions(+), 32 deletions(-) diff --git a/scripts/backup b/scripts/backup index 4c34e45..9f09283 100644 --- a/scripts/backup +++ b/scripts/backup @@ -22,21 +22,13 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -#================================================= -# BACKUP LOGROTATE -#================================================= - ynh_backup --src_path="/etc/logrotate.d/$app" #================================================= diff --git a/scripts/remove b/scripts/remove index ae2a058..60cd62c 100644 --- a/scripts/remove +++ b/scripts/remove @@ -25,9 +25,6 @@ ynh_remove_nginx_config # Remove the dedicated PHP-FPM config ynh_remove_fpm_config -# Remove the log files -ynh_secure_remove --file="/var/log/$app" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index aa5fa89..1d14eda 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -31,22 +25,19 @@ fi #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="configuration.php" +# Run internal update of joomla fixing missing database tables - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="configuration.php" - # Run internal update of joomla fixing missing database tables - pushd "$install_dir" - php$phpversion cli/joomla.php core:update - popd - # Remove installation directory - ynh_secure_remove --file="$install_dir/installation" - # Fix #34 - ynh_secure_remove --file="$install_dir/administrator/cache/autoload_psr4.php" -fi +pushd "$install_dir" + php$phpversion cli/joomla.php core:update +popd +# Remove installation directory +ynh_secure_remove --file="$install_dir/installation" +# Fix #34 +ynh_secure_remove --file="$install_dir/administrator/cache/autoload_psr4.php" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir"