From c4e1e442e4784e6d0156c669b3d527b1367eb38d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 18 Jan 2024 11:54:18 +0100 Subject: [PATCH] Cleanup, add php7.4 dependencies --- manifest.toml | 4 +++- scripts/restore | 4 ++-- scripts/upgrade | 15 +++++---------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/manifest.toml b/manifest.toml index ca331c9..7e76ed6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -63,5 +63,7 @@ ram.runtime = "50M" [resources.apt] packages = [ - + "php7.4-fpm", + "php7.4-gd", + "php7.4-curl", ] diff --git a/scripts/restore b/scripts/restore index 21bc9df..7c71306 100644 --- a/scripts/restore +++ b/scripts/restore @@ -18,7 +18,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # RESTORE SYSTEM CONFIGURATIONS @@ -36,7 +36,7 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1 -ynh_systemd_action --service_name=php$phpversion-fpm --action=reload +ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index a67b018..098e52f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -8,26 +8,21 @@ source _common.sh source /usr/share/yunohost/helpers - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +# ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ]; then - ynh_script_progression --message="Upgrading source files..." --weight=1 - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="store/conf/hosts.xml store/conf/main.xml store/conf/installed.xml" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # Set Jappix configuration