From 6d52551a75adacab5cf3072932a846fbc88c8b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:57:05 +0200 Subject: [PATCH] cleaning --- doc/DESCRIPTION.md | 2 +- manifest.toml | 9 ++++----- scripts/backup | 6 +----- scripts/install | 5 ----- scripts/remove | 2 -- scripts/restore | 4 ---- scripts/upgrade | 14 ++------------ 7 files changed, 8 insertions(+), 34 deletions(-) diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 8eb52e8..8390cca 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1 +1 @@ -Yellow is for people who make small websites \ No newline at end of file +Yellow is for people who make small websites. \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index 56d0181..7723086 100644 --- a/manifest.toml +++ b/manifest.toml @@ -2,8 +2,8 @@ packaging_format = 2 id = "yellow" name = "Yellow" -description.en = "Content management system (CMS) for simple website" -description.fr = "Système de gestion de contenu (CMS) pour un site simple" +description.en = "Content management system for simple website" +description.fr = "Système de gestion de contenu pour un site simple" version = "2024.05.29~ynh1" @@ -17,7 +17,7 @@ admindoc = "https://datenstrom.se/yellow/help/" code = "https://github.com/datenstrom/yellow/" [integration] -yunohost = ">= 11.2.18" +yunohost = ">= 11.2.29" helpers_version = "2.1" architectures = "all" multi_instance = true @@ -58,5 +58,4 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "php8.2-mbstring, php8.2-xmlrpc, php8.2-sqlite3, php8.2-soap, php8.2-gd, php8.2-xml, php8.2-cli, php8.2-curl, php8.2-zip" - + packages = "php8.3-mbstring, php8.3-xmlrpc, php8.3-sqlite3, php8.3-soap, php8.3-gd, php8.3-xml, php8.3-cli, php8.3-curl, php8.3-zip" diff --git a/scripts/backup b/scripts/backup index 84a5ed5..2f83233 100644 --- a/scripts/backup +++ b/scripts/backup @@ -12,15 +12,11 @@ ynh_print_info "Declaring files to be backed up..." ynh_backup "$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf" #================================================= diff --git a/scripts/install b/scripts/install index 849092d..16a3a4c 100644 --- a/scripts/install +++ b/scripts/install @@ -8,20 +8,15 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Setting up source files..." -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # SYSTEM CONFIGURATION #================================================= ynh_script_progression "Adding system configurations related to $app..." -# Create a dedicated NGINX config ynh_config_add_nginx -# Create a dedicated PHP-FPM config ynh_config_add_phpfpm #================================================= diff --git a/scripts/remove b/scripts/remove index 8069c9c..ee9c6ec 100644 --- a/scripts/remove +++ b/scripts/remove @@ -8,10 +8,8 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Removing system configurations related to $app..." -# Remove the dedicated NGINX config ynh_config_remove_nginx -# Remove the dedicated PHP-FPM config ynh_config_remove_phpfpm #================================================= diff --git a/scripts/restore b/scripts/restore index cb1bebc..2182661 100644 --- a/scripts/restore +++ b/scripts/restore @@ -10,13 +10,9 @@ ynh_script_progression "Restoring the app main directory..." ynh_restore "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= ynh_script_progression "Restoring system configurations related to $app..." ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index d538251..21cf57a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -6,27 +6,17 @@ source /usr/share/yunohost/helpers #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression "Upgrading source files..." -# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed -if ynh_app_upstream_version_changed -then - ynh_script_progression "Upgrading source files..." +ynh_setup_source --dest_dir="$install_dir" --keep="content media system/extensions" - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="content media system/extensions" -fi - -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= ynh_script_progression "Upgrading system configurations related to $app..." -# Create a dedicated NGINX config ynh_config_add_nginx -# Create a dedicated php-fpm config ynh_config_add_phpfpm #=================================================