diff --git a/README.md b/README.md index 1e349cf..716d1b6 100644 --- a/README.md +++ b/README.md @@ -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:** diff --git a/README_es.md b/README_es.md index 24dfa8f..9adcd31 100644 --- a/README_es.md +++ b/README_es.md @@ -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:** diff --git a/README_eu.md b/README_eu.md index 76b19ef..515fc88 100644 --- a/README_eu.md +++ b/README_eu.md @@ -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:** diff --git a/README_fr.md b/README_fr.md index 2f57321..e199f3e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -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 :** diff --git a/README_gl.md b/README_gl.md index 84b6404..29b3cae 100644 --- a/README_gl.md +++ b/README_gl.md @@ -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:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 1ad520f..498f33e 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -27,7 +27,7 @@ - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**分发版本:** 5.2.0~ynh1 +**分发版本:** 5.2.0~ynh2 **演示:** diff --git a/conf/.env.example b/conf/.env similarity index 99% rename from conf/.env.example rename to conf/.env index ae53542..b056ff1 100644 --- a/conf/.env.example +++ b/conf/.env @@ -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 diff --git a/config_panel.toml b/config_panel.toml.example similarity index 100% rename from config_panel.toml rename to config_panel.toml.example diff --git a/manifest.toml b/manifest.toml index b9b7a9c..6a82ade 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 = "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" diff --git a/scripts/_common.sh b/scripts/_common.sh index 1db13c2..6381490 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # Composer version -YNH_COMPOSER_VERSION="2.5.8" +YNH_COMPOSER_VERSION="2.7.7" #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 86dca3b..b231a48 100755 --- a/scripts/backup +++ b/scripts/backup @@ -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" #================================================= diff --git a/scripts/install b/scripts/install index 9608fe1..42f837a 100755 --- a/scripts/install +++ b/scripts/install @@ -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" diff --git a/scripts/upgrade b/scripts/upgrade index ecc1064..df01501 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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"