From 1eae6180d54159adb7b3777eb49bfc887ebc4c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 30 Aug 2024 22:30:45 +0200 Subject: [PATCH] cleaning --- manifest.toml | 2 +- scripts/install | 7 ------- scripts/remove | 1 - scripts/restore | 7 ------- scripts/upgrade | 20 +++----------------- 5 files changed, 4 insertions(+), 33 deletions(-) diff --git a/manifest.toml b/manifest.toml index 19a681c..7a2d5eb 100644 --- a/manifest.toml +++ b/manifest.toml @@ -14,7 +14,7 @@ license = "MIT" code = "https://github.com/jatekos101/20euros" [integration] -yunohost = ">= 11.2.18" +yunohost = ">= 11.2.28" helpers_version = "2.1" architectures = "all" multi_instance = true diff --git a/scripts/install b/scripts/install index ce61a99..4b5d250 100755 --- a/scripts/install +++ b/scripts/install @@ -19,13 +19,6 @@ ynh_script_progression "Configuring NGINX web server..." # Create a dedicated NGINX config ynh_config_add_nginx -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -#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 -#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 o-rwx $install_dir #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index 468c041..b3575da 100755 --- a/scripts/remove +++ b/scripts/remove @@ -7,7 +7,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Removing NGINX web server configuration..." -# Remove the dedicated NGINX config ynh_config_remove_nginx #================================================= diff --git a/scripts/restore b/scripts/restore index fd96e49..3543d9f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -17,13 +17,6 @@ ynh_script_progression "Restoring $app main directory..." ynh_restore "$install_dir" -#================================================= -# RESTORE USER RIGHTS -#================================================= - -# Restore permissions on app files -#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 -#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 o-rwx $install_dir #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index fbde5e5..6f2ca30 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -5,17 +5,10 @@ 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..." - - # Download the source from ../sources - - mkdir -p $install_dir - cp -a ../sources/* $install_dir -fi +mkdir -p $install_dir +cp -a ../sources/* $install_dir #================================================= # NGINX CONFIGURATION @@ -25,13 +18,6 @@ ynh_script_progression "Upgrading NGINX web server configuration..." # Create a dedicated NGINX config ynh_config_add_nginx -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions on app files -#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 -#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 o-rwx $install_dir #================================================= # END OF SCRIPT #=================================================