From 6dadc0dc19ccebf430b8c39731e4e550cec4e5f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:37:53 +0200 Subject: [PATCH] cleaning --- manifest.toml | 2 +- scripts/backup | 4 ---- scripts/install | 9 ++------- scripts/remove | 7 ------- scripts/restore | 5 ----- scripts/upgrade | 25 +++++-------------------- 6 files changed, 8 insertions(+), 44 deletions(-) diff --git a/manifest.toml b/manifest.toml index 9f284e2..1118484 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,7 +16,7 @@ admindoc = "http://get-simple.info/wiki/fr:start" code = "https://github.com/GetSimpleCMS/GetSimpleCMS" [integration] -yunohost = ">= 11.1.20" +yunohost = ">= 11.2" architectures = "all" multi_instance = true ldap = false diff --git a/scripts/backup b/scripts/backup index 18f83fe..c5c603d 100755 --- a/scripts/backup +++ b/scripts/backup @@ -27,10 +27,6 @@ ynh_backup --src_path="$install_dir" 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" #================================================= diff --git a/scripts/install b/scripts/install index 7548fa6..07bcbaf 100755 --- a/scripts/install +++ b/scripts/install @@ -32,10 +32,8 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 -# Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config -# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -45,7 +43,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/temp.gsconfig.php" --destination="$install_dir/gsconfig.php" +ynh_add_config --template="temp.gsconfig.php" --destination="$install_dir/gsconfig.php" chmod 400 "$install_dir/gsconfig.php" chown $app:$app "$install_dir/gsconfig.php" @@ -55,9 +53,6 @@ chown $app:$app "$install_dir/gsconfig.php" #================================================= ynh_script_progression --message="Setuping application with CURL..." -# Set the app as temporarily public for curl call -ynh_script_progression --message="Configuring SSOwat..." - # Installation with curl ynh_script_progression --message="Finalizing installation..." ynh_local_curl "/admin/install.php" "lang=$language" "continue=continue" diff --git a/scripts/remove b/scripts/remove index 79cb058..ac762c0 100755 --- a/scripts/remove +++ b/scripts/remove @@ -14,15 +14,8 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 -# 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 #================================================= diff --git a/scripts/restore b/scripts/restore index a81e60e..a40b0a4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -27,11 +27,6 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig 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" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d1063b6..0ff7d90 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,23 +15,13 @@ source /usr/share/yunohost/helpers timezone="$(cat /etc/timezone)" -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=5 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=5 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="gsconfig.php data/ backups/" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="gsconfig.php data/ backups/" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -42,12 +32,7 @@ chown -R $app:www-data "$install_dir" 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 +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config @@ -59,7 +44,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Updating a configuration file..." -ynh_add_config --template="../conf/temp.gsconfig.php" --destination="$install_dir/gsconfig.php" +ynh_add_config --template="temp.gsconfig.php" --destination="$install_dir/gsconfig.php" chmod 400 "$install_dir/gsconfig.php" chown $app:$app "$install_dir/gsconfig.php"