1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/2FAuth_ynh.git synced 2024-09-03 20:36:18 +02:00

Merge pull request #19 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2022-11-21 18:13:48 +01:00 committed by GitHub
commit b74005200a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 45 additions and 43 deletions

View file

@ -27,7 +27,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo
- Edit accounts, even the imported ones
- Generate TOTP and HOTP security codes
**Shipped version:** 3.3.2~ynh1
**Shipped version:** 3.4.0~ynh1
**Demo:** https://demo.2fauth.app/login

View file

@ -27,7 +27,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo
- Edit accounts, even the imported ones
- Generate TOTP and HOTP security codes
**Version incluse :** 3.3.2~ynh1
**Version incluse :** 3.4.0~ynh1
**Démo :** https://demo.2fauth.app/login

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/Bubka/2FAuth/archive/refs/tags/v3.3.2.tar.gz
SOURCE_SUM=4c81b4323d7496753253ee34bfac5cbdfac1f7b772bd1b8061e4c78ade9a406e
SOURCE_URL=https://github.com/Bubka/2FAuth/archive/refs/tags/v3.4.0.tar.gz
SOURCE_SUM=3262de96b5a1525b6b51dc679d655dd602d0cd523b8901dfbb0e25dd844a069d
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -1,4 +1,5 @@
location / {
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
# Path to source
root __FINALPATH__/public/;

View file

@ -6,7 +6,7 @@
"en": "self-hosted alternative to One Time Passcode",
"fr": "Alternative auto-hébergée a One Time Passcode"
},
"version": "3.3.2~ynh1",
"version": "3.4.0~ynh1",
"url": "https://github.com/Bubka/2FAuth",
"upstream": {
"license": "AGPL-3.0",
@ -20,12 +20,12 @@
"email": ""
},
"requirements": {
"yunohost": ">= 4.3.0"
"yunohost": ">= 11.0.9"
},
"multi_instance": true,
"services": [
"nginx",
"php8.0-fpm",
"php8.1-fpm",
"mysql"
],
"arguments": {

View file

@ -4,10 +4,10 @@
# COMMON VARIABLES
#=================================================
YNH_PHP_VERSION="8.0"
YNH_PHP_VERSION="8.1"
# Composer version
YNH_COMPOSER_VERSION="2.3.5"
YNH_COMPOSER_VERSION="2.4.4"
pkg_dependencies="php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql"

View file

@ -29,10 +29,11 @@ path_url="/"
is_public=$YNH_APP_ARG_IS_PUBLIC
phpversion=$YNH_PHP_VERSION
admin=$YNH_APP_ARG_ADMIN
email=$(ynh_user_get_info --username=$admin --key=mail)
app=$YNH_APP_INSTANCE_NAME
email=$(ynh_user_get_info --username=$admin --key=mail)
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#=================================================
@ -91,14 +92,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -107,6 +100,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# INSTALL 2FAUTH WITH COMPOSER
#=================================================

View file

@ -45,13 +45,6 @@ test ! -d $final_path \
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
@ -86,6 +79,13 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================

View file

@ -60,13 +60,6 @@ if ! ynh_permission_exists --permission="api"; then
ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true"
fi
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=6
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
#=================================================
@ -84,13 +77,28 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=3
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env $final_path/storage"
ynh_setup_source --dest_dir="$final_path" --keep=".env storage"
fi
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=6
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -100,15 +108,7 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
ynh_add_nginx_config
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion=$phpversion
#=================================================
# INSTALL LYCHEE WITH COMPOSER
# INSTALL 2FAUTH WITH COMPOSER
#=================================================
ynh_script_progression --message="Installing $app with Composer..." --weight=15