From 125412fbd86d6eaf313386ee70f61edef469851c 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 22:21:34 +0200 Subject: [PATCH] cleaning --- manifest.toml | 2 +- scripts/_common.sh | 1 - scripts/backup | 3 --- scripts/install | 9 --------- scripts/remove | 2 -- scripts/restore | 3 --- scripts/upgrade | 9 --------- 7 files changed, 1 insertion(+), 28 deletions(-) diff --git a/manifest.toml b/manifest.toml index bf9652a..a9df5a4 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://lycheeorg.github.io/docs/" code = "https://github.com/LycheeOrg/Lychee" [integration] -yunohost = ">= 11.2.18" +yunohost = ">= 11.2.29" helpers_version = "2.1" architectures = ["arm64", "amd64"] multi_instance = true diff --git a/scripts/_common.sh b/scripts/_common.sh index f50f88a..452176f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,5 +4,4 @@ # COMMON VARIABLES AND CUSTOM HELPERS #================================================= -# Composer version composer_version="2.7.7" diff --git a/scripts/backup b/scripts/backup index ff26a6b..4588c64 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,6 +1,5 @@ #!/bin/bash -# 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 @@ -26,8 +25,6 @@ ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf" -#================================================= -# SPECIFIC BACKUP #================================================= # BACKUP THE MYSQL DATABASE #================================================= diff --git a/scripts/install b/scripts/install index 1489a47..5d3d4c3 100755 --- a/scripts/install +++ b/scripts/install @@ -16,11 +16,8 @@ timezone="$(cat /etc/timezone)" #================================================= 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 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" #================================================= # APP INITIAL CONFIGURATION #================================================= @@ -28,18 +25,13 @@ ynh_script_progression "Adding $app's configuration files..." ynh_config_add --template=".env" --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 ynh_config_add_phpfpm -# Create a dedicated NGINX config ynh_config_add_nginx #================================================= @@ -62,7 +54,6 @@ pushd "$install_dir" "php$php_version" artisan config:cache -n popd -#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" chmod -R 775 /home/yunohost.app/$app/ chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" diff --git a/scripts/remove b/scripts/remove index 8069c9c..ee9c6ec 100755 --- 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 0e29657..c00bc57 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,6 +1,5 @@ #!/bin/bash -# 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 @@ -11,8 +10,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 | 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" chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$install_dir/bootstrap/" diff --git a/scripts/upgrade b/scripts/upgrade index 84000b2..bc5b246 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,11 +12,8 @@ timezone="$(cat /etc/timezone)" #================================================= 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 public/uploads/" --full_replace -#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" -#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 #================================================= @@ -24,18 +21,13 @@ ynh_script_progression "Updating configuration..." ynh_config_add --template=".env" --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..." -# Create a dedicated PHP-FPM config ynh_config_add_phpfpm -# Create a dedicated NGINX config ynh_config_add_nginx #================================================= @@ -61,7 +53,6 @@ pushd "$install_dir" "php$php_version" artisan view:clear popd -#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" chmod -R 775 /home/yunohost.app/$app/ chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/"