From 5e2e52cb51cc9f575fdd39e991a52bae674433af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:57:15 +0100 Subject: [PATCH 1/2] cleaning --- manifest.toml | 6 +++--- scripts/backup | 1 - scripts/install | 5 ++--- scripts/remove | 6 ------ scripts/restore | 1 + scripts/upgrade | 7 +++---- 6 files changed, 9 insertions(+), 17 deletions(-) diff --git a/manifest.toml b/manifest.toml index ba7e5e9..2e0a054 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "2FAuth" description.en = "self-hosted alternative to One Time Passcode" description.fr = "Alternative auto-hébergée a One Time Passcode" -version = "4.2.4~ynh1" +version = "5.0.0~ynh1" maintainers = ["eric_G"] @@ -44,8 +44,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/Bubka/2FAuth/archive/refs/tags/v4.2.4.tar.gz" - sha256 = "997bec1648eb0dce453415eaff43ef53e9310b2c2fb15c6acd0e5c04f7b700ee" + url = "https://github.com/Bubka/2FAuth/archive/refs/tags/v5.0.0.tar.gz" + sha256 = "7664a8275320b92b0246cb017ca121b92906e9bc85c0a013b6b1ef95485e622e" autoupdate.strategy = "latest_github_tag" [resources.system_user] diff --git a/scripts/backup b/scripts/backup index 214b288..86dca3b 100755 --- a/scripts/backup +++ b/scripts/backup @@ -6,7 +6,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 4e15657..6178fe0 100755 --- a/scripts/install +++ b/scripts/install @@ -34,6 +34,7 @@ ynh_script_progression --message="Setting up source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" +chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= @@ -41,10 +42,8 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 -# Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint -# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -60,7 +59,7 @@ ynh_install_composer --install_args="--prefer-dist --no-scripts --no-dev" ynh_script_progression --message="Adding a configuration file..." --weight=1 # Setup application config -ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.env" +ynh_add_config --template=".env.example" --destination="$install_dir/.env" chmod 644 "$install_dir/.env" chown $app:$app "$install_dir/.env" diff --git a/scripts/remove b/scripts/remove index 79cb058..5a4ee64 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,12 +17,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 - -# Remove the dedicated PHP-FPM config ynh_remove_fpm_config #================================================= diff --git a/scripts/restore b/scripts/restore index b6a9962..d5a04cd 100755 --- a/scripts/restore +++ b/scripts/restore @@ -17,6 +17,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" +chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6df9059..2c33260 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -50,6 +50,7 @@ then ynh_setup_source --dest_dir="$install_dir" --keep="storage .env" fi +chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= @@ -57,10 +58,8 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 -# Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint -# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -71,7 +70,7 @@ ynh_add_nginx_config #email=$(ynh_user_get_info --username=$admin --key=mail) # Setup application config -#ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.env" +#ynh_add_config --template=".env.example" --destination="$install_dir/.env" #chmod 644 "$install_dir/.env" #chown $app:$app "$install_dir/.env" From 526fff33a90194d478044ab99130a253b2f060c7 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 22 Dec 2023 12:57:20 +0000 Subject: [PATCH 2/2] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2e806fa..a1c4a80 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Shipped version:** 4.2.4~ynh1 +**Shipped version:** 5.0.0~ynh1 **Demo:** https://demo.2fauth.app/login diff --git a/README_fr.md b/README_fr.md index 48fefba..1547405 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po - Modifier les comptes, même ceux importés - Générer des codes de sécurité TOTP et HOTP -**Version incluse :** 4.2.4~ynh1 +**Version incluse :** 5.0.0~ynh1 **Démo :** https://demo.2fauth.app/login