From 30ab966e3696011715132f1c64fb6c28acd4a449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 1 Sep 2024 12:59:10 +0200 Subject: [PATCH] cleaning --- manifest.toml | 2 +- scripts/backup | 1 - scripts/install | 7 ------- scripts/restore | 3 --- scripts/upgrade | 7 +------ 5 files changed, 2 insertions(+), 18 deletions(-) diff --git a/manifest.toml b/manifest.toml index 1ad7849..dd215e6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -19,7 +19,7 @@ admindoc = "https://docs.directorylister.com/" code = "https://github.com/DirectoryLister/DirectoryLister" [integration] -yunohost = ">= 11.2.18" +yunohost = ">= 11.2.29" helpers_version = "2.1" architectures = "all" multi_instance = true diff --git a/scripts/backup b/scripts/backup index 31e2f56..7c7b3e5 100755 --- a/scripts/backup +++ b/scripts/backup @@ -4,7 +4,6 @@ # IMPORT GENERIC HELPERS #================================================= -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers diff --git a/scripts/install b/scripts/install index cfb00e9..79c20ca 100755 --- a/scripts/install +++ b/scripts/install @@ -16,10 +16,8 @@ ynh_app_setting_set --key=php_memory_limit --value=256M #================================================= 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 | chown -R "$app:www-data" "$install_dir" #================================================= # ADD A CONFIGURATION #================================================= @@ -27,18 +25,13 @@ ynh_script_progression "Adding $app's configuration..." ynh_config_add --template=".env.example" --destination="$install_dir/.env" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/.env" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown "$app:$app" "$install_dir/.env" - #================================================= # SYSTEM CONFIGURATION #================================================= ynh_script_progression "Adding system configurations related to $app..." -# Create a dedicated PHP-FPM config using the conf/php-fpm.conf or conf/extra_php-fpm.conf ynh_config_add_phpfpm -# Create a dedicated NGINX config using the conf/nginx.conf template ynh_config_add_nginx #================================================= diff --git a/scripts/restore b/scripts/restore index 20346be..26e95ed 100755 --- a/scripts/restore +++ b/scripts/restore @@ -4,7 +4,6 @@ # IMPORT GENERIC HELPERS #================================================= -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -15,7 +14,6 @@ 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 | chown -R "$app:www-data" "$install_dir" #================================================= # SYSTEM CONFIGURATION #================================================= @@ -30,7 +28,6 @@ ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= ynh_script_progression "Reloading NGINX web server and $app's service..." -# Typically you only have either $app or php-fpm but not both at the same time... ynh_systemctl --service="php$php_version-fpm" --action=reload ynh_systemctl --service=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 2f93402..5b84f1d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,10 +16,8 @@ ynh_app_setting_set_default --key=php_memory_limit --value=256M #================================================= ynh_script_progression "Upgrading source files..." -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" --keep=".env" -#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" #================================================= # UPDATE A CONFIG FILE #================================================= @@ -27,10 +25,7 @@ ynh_setup_source --dest_dir="$install_dir" --keep=".env" # ynh_config_add --template=".env.example" --destination="$install_dir/.env" -# #REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/.env" -# #REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/.env" - -#================================================= +#============================================== # REAPPLY SYSTEM CONFIGURATIONS #================================================= ynh_script_progression "Upgrading system configurations related to $app..."