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 #75 from YunoHost-Apps/testing

Testing
This commit is contained in:
eric_G 2024-06-17 17:04:50 +02:00 committed by GitHub
commit c774febd1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 18 additions and 57 deletions

View file

@ -27,7 +27,7 @@ It shall NOT be edited by hand.
- Edit accounts, even the imported ones
- Generate TOTP and HOTP security codes
**Shipped version:** 5.2.0~ynh1
**Shipped version:** 5.2.0~ynh2
**Demo:** <https://demo.2fauth.app/login>

View file

@ -27,7 +27,7 @@ No se debe editar a mano.
- Edit accounts, even the imported ones
- Generate TOTP and HOTP security codes
**Versión actual:** 5.2.0~ynh1
**Versión actual:** 5.2.0~ynh2
**Demo:** <https://demo.2fauth.app/login>

View file

@ -27,7 +27,7 @@ EZ editatu eskuz.
- Edit accounts, even the imported ones
- Generate TOTP and HOTP security codes
**Paketatutako bertsioa:** 5.2.0~ynh1
**Paketatutako bertsioa:** 5.2.0~ynh2
**Demoa:** <https://demo.2fauth.app/login>

View file

@ -27,7 +27,7 @@ Il NE doit PAS être modifié à la main.
- Modifier les comptes, même ceux importés
- Générer des codes de sécurité TOTP et HOTP
**Version incluse:** 5.2.0~ynh1
**Version incluse:** 5.2.0~ynh2
**Démo:** <https://demo.2fauth.app/login>

View file

@ -27,7 +27,7 @@ NON debe editarse manualmente.
- Edit accounts, even the imported ones
- Generate TOTP and HOTP security codes
**Versión proporcionada:** 5.2.0~ynh1
**Versión proporcionada:** 5.2.0~ynh2
**Demo:** <https://demo.2fauth.app/login>

View file

@ -27,7 +27,7 @@
- Edit accounts, even the imported ones
- Generate TOTP and HOTP security codes
**分发版本:** 5.2.0~ynh1
**分发版本:** 5.2.0~ynh2
**演示:** <https://demo.2fauth.app/login>

View file

@ -121,11 +121,11 @@ DB_PASSWORD=__DB_PWD__
MAIL_DRIVER=smtp
MAIL_HOST=localhost
MAIL_PORT=587
MAIL_PORT=25
MAIL_FROM=__APP__@__DOMAIN__
MAIL_USERNAME=__APP__
MAIL_PASSWORD=__MAIL_PWD__
MAIL_ENCRYPTION=starttls
MAIL_ENCRYPTION=null
#MAIL_FROM_NAME=null
#MAIL_FROM_ADDRESS=null

View file

@ -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 = "5.2.0~ynh1"
version = "5.2.0~ynh2"
maintainers = []
@ -61,7 +61,7 @@ ram.runtime = "50M"
api.auth_header = false
[resources.apt]
packages = "mariadb-server, php8.2-bcmath, php8.2-xml, php8.2-mbstring, php8.2-gd, php8.2-mysql, php8.2-curl"
packages = "mariadb-server, php8.3-bcmath, php8.3-xml, php8.3-mbstring, php8.3-gd, php8.3-mysql, php8.3-curl"
[resources.database]
type = "mysql"

View file

@ -5,7 +5,7 @@
#=================================================
# Composer version
YNH_COMPOSER_VERSION="2.5.8"
YNH_COMPOSER_VERSION="2.7.7"
#=================================================
# PERSONAL HELPERS

View file

@ -26,10 +26,6 @@ ynh_backup --src_path="$install_dir"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================

View file

@ -14,18 +14,11 @@ source /usr/share/yunohost/helpers
#=================================================
email=$(ynh_user_get_info --username=$admin --key=mail)
fpm_footprint="low"
fpm_free_footprint=0
fpm_usage="low"
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
# key for the .env __KEY__
key=$(ynh_string_random --length=45 | base64)
ynh_app_setting_set --app=$app --key=key --value=$key
@ -46,7 +39,7 @@ chown -R $app:www-data "$install_dir"
#=================================================
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
ynh_add_fpm_config
ynh_add_nginx_config
@ -63,7 +56,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=".env.example" --destination="$install_dir/.env"
ynh_add_config --template=".env" --destination="$install_dir/.env"
chmod 640 "$install_dir/.env"
chown $app:$app "$install_dir/.env"

View file

@ -9,35 +9,11 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# If fpm_footprint doesn't exist, create it
if [ -z "${fpm_footprint:-}" ]; then
fpm_footprint=low
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
fi
# If fpm_free_footprint doesn't exist, create it
if [ -z "${fpm_free_footprint:-}" ]; then
fpm_free_footprint=0
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
fi
# If fpm_usage doesn't exist, create it
if [ -z "${fpm_usage:-}" ]; then
fpm_usage=low
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
fi
if [ -z "${key:-}" ]; then
key=$(ynh_string_random --length=45 | base64)
ynh_app_setting_set --app=$app --key=key --value=$key
@ -46,14 +22,10 @@ fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Upgrading source files..." --weight=3
if [ "$upgrade_type" == "UPGRADE_APP" ]
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="$install_dir" --full_replace=1 --keep="public/storage storage .env"
fi
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="public/storage storage .env"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
@ -63,7 +35,7 @@ chown -R $app:www-data "$install_dir"
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
ynh_add_fpm_config
ynh_add_nginx_config
@ -73,7 +45,7 @@ ynh_add_nginx_config
ynh_script_progression --message="Upgrading a configuration file..." --weight=1
# Setup application config
ynh_add_config --template=".env.example" --destination="$install_dir/.env"
ynh_add_config --template=".env" --destination="$install_dir/.env"
chmod 640 "$install_dir/.env"
chown $app:$app "$install_dir/.env"