From 492a20ec949524e41b2ef57dba4986ad774b640f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 23 Jun 2024 08:57:38 +0200 Subject: [PATCH] cleaning --- manifest.toml | 2 +- scripts/_common.sh | 1 - scripts/install | 3 --- scripts/remove | 5 ++--- scripts/upgrade | 7 ++----- 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/manifest.toml b/manifest.toml index 51f863f..8bb0d50 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,7 +16,7 @@ admindoc = "https://docs.2fauth.app/" code = "https://github.com/Bubka/2FAuth" [integration] -yunohost = ">= 11.2" +yunohost = ">= 11.2.15" helpers_version = "2.1" architectures = "all" 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/install b/scripts/install index cbf80d4..a1ee008 100755 --- a/scripts/install +++ b/scripts/install @@ -22,7 +22,6 @@ ynh_app_setting_set --key=key --value=$key #================================================= 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" chmod -R o-rwx "$install_dir" @@ -50,7 +49,6 @@ ynh_composer_exec install --no-dev --prefer-dist --no-scripts --no-dev #================================================= ynh_script_progression "Adding $app's configuration..." -# Setup application config ynh_config_add --template=".env" --destination="$install_dir/.env" chmod 640 "$install_dir/.env" @@ -61,7 +59,6 @@ chown $app:$app "$install_dir/.env" #================================================= ynh_script_progression "Building $app..." -# Setup application config pushd $install_dir php$php_version artisan migrate:refresh -n php$php_version artisan passport:install -n diff --git a/scripts/remove b/scripts/remove index de1a1fe..ee9c6ec 100755 --- a/scripts/remove +++ b/scripts/remove @@ -4,11 +4,10 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# REMOVE NGINX CONFIGURATION +# REMOVE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression "Removing NGINX web server configuration..." +ynh_script_progression "Removing system configurations related to $app..." -# Remove the dedicated NGINX config ynh_config_remove_nginx ynh_config_remove_phpfpm diff --git a/scripts/upgrade b/scripts/upgrade index 0325e1d..ca26e5d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,16 +19,15 @@ fi #================================================= ynh_script_progression "Upgrading source files..." -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" --full_replace --keep="public/storage storage .env" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= -# PHP-FPM CONFIGURATION +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression "Upgrading PHP-FPM configuration..." +ynh_script_progression "Upgrading system configurations related to $app..." ynh_config_add_phpfpm @@ -39,7 +38,6 @@ ynh_config_add_nginx #================================================= ynh_script_progression "Upgrading a configuration file..." -# Setup application config ynh_config_add --template=".env" --destination="$install_dir/.env" chmod 640 "$install_dir/.env" @@ -62,7 +60,6 @@ ynh_script_progression "Building..." ynh_composer_exec update -# Setup application config pushd $install_dir php$php_version artisan cache:clear php$php_version artisan config:clear