From 82200e71bec3726db60bdd0d9c074d95d01d699f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 16 Aug 2023 13:54:04 +0200 Subject: [PATCH] cleaning --- manifest.toml | 4 ++-- scripts/remove | 12 ------------ scripts/restore | 22 ++++++---------------- scripts/upgrade | 14 ++------------ 4 files changed, 10 insertions(+), 42 deletions(-) diff --git a/manifest.toml b/manifest.toml index 162a820..391ff60 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "osTicket" description.en = "Open source support ticket system" description.fr = "Système de ticket de support open source" -version = "1.18~ynh3" +version = "1.18~ynh4" maintainers = ["yalh76"] @@ -17,7 +17,7 @@ userdoc = "https://docs.osticket.com" code = "https://github.com/osTicket/osTicket" [integration] -yunohost = ">= 11.1.21" +yunohost = ">= 11.2" architectures = "all" multi_instance = true ldap = false diff --git a/scripts/remove b/scripts/remove index 3242cce..a18a484 100644 --- a/scripts/remove +++ b/scripts/remove @@ -17,21 +17,9 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 - # Remove the dedicated PHP-FPM config ynh_remove_fpm_config -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= -ynh_script_progression --message="Removing various files..." --weight=1 - # Remove a cron file ynh_secure_remove --file="/etc/cron.d/$app" diff --git a/scripts/restore b/scripts/restore index 8cc7521..1a4ea57 100644 --- a/scripts/restore +++ b/scripts/restore @@ -21,20 +21,6 @@ chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" - -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RESTORE THE MYSQL DATABASE #================================================= @@ -43,9 +29,13 @@ ynh_script_progression --message="Restoring the MySQL database..." --weight=1 ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= -# RESTORE VARIOUS FILES +# RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Restoring various files..." --weight=1 +ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/cron.d/$app" diff --git a/scripts/upgrade b/scripts/upgrade index 97438b1..e630717 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -64,14 +64,11 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=low --footprint=low -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - # Create a dedicated NGINX config ynh_add_nginx_config +ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" + #================================================= # SPECIFIC UPGRADE #================================================= @@ -127,13 +124,6 @@ pushd "$install_dir" php$phpversion manage.php upgrade popd -#================================================= -# SET THE CRON FILE -#================================================= -ynh_script_progression --message="Setting the cron file..." --weight=1 - -ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" - #================================================= # END OF SCRIPT #=================================================