Merge pull request #48 from YunoHost-Apps/adjust-email

Adjust email for Yunohost >11.2
This commit is contained in:
Thomas 2023-11-19 12:24:37 +01:00 committed by GitHub
commit 179fc0879d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 6 deletions

View file

@ -32,6 +32,7 @@ BookWyrm is a social network for tracking your reading, talking about books, wri
* Official app website: <https://joinbookwyrm.com/fr/> * Official app website: <https://joinbookwyrm.com/fr/>
* Official admin documentation: <https://docs.joinbookwyrm.com/> * Official admin documentation: <https://docs.joinbookwyrm.com/>
* Upstream app code repository: <https://github.com/bookwyrm-social/bookwyrm> * Upstream app code repository: <https://github.com/bookwyrm-social/bookwyrm>
* YunoHost Store: <https://apps.yunohost.org/app/bookwyrm>
* Report a bug: <https://github.com/YunoHost-Apps/bookwyrm_ynh/issues> * Report a bug: <https://github.com/YunoHost-Apps/bookwyrm_ynh/issues>
## Developer info ## Developer info

View file

@ -32,6 +32,7 @@ BookWyrm est un réseau social pour garder la trace de vos lectures, parler de l
* Site officiel de lapp : <https://joinbookwyrm.com/fr/> * Site officiel de lapp : <https://joinbookwyrm.com/fr/>
* Documentation officielle de ladmin : <https://docs.joinbookwyrm.com/> * Documentation officielle de ladmin : <https://docs.joinbookwyrm.com/>
* Dépôt de code officiel de lapp : <https://github.com/bookwyrm-social/bookwyrm> * Dépôt de code officiel de lapp : <https://github.com/bookwyrm-social/bookwyrm>
* YunoHost Store: <https://apps.yunohost.org/app/bookwyrm>
* Signaler un bug : <https://github.com/YunoHost-Apps/bookwyrm_ynh/issues> * Signaler un bug : <https://github.com/YunoHost-Apps/bookwyrm_ynh/issues>
## Informations pour les développeurs ## Informations pour les développeurs

View file

@ -47,11 +47,11 @@ FLOWER_PASSWORD=changeme
# Email config # Email config
EMAIL_HOST=localhost EMAIL_HOST=localhost
EMAIL_PORT=587 EMAIL_PORT=587
EMAIL_HOST_USER=__ADMIN_MAIL__ EMAIL_HOST_USER=__APP__
EMAIL_HOST_PASSWORD= EMAIL_HOST_PASSWORD=__MAIL_PWD__
EMAIL_USE_TLS=true EMAIL_USE_TLS=true
EMAIL_USE_SSL=false EMAIL_USE_SSL=false
EMAIL_SENDER_NAME=__ADMIN_MAIL__ EMAIL_SENDER_NAME=__APP__
# defaults to DOMAIN # defaults to DOMAIN
#EMAIL_SENDER_DOMAIN= #EMAIL_SENDER_DOMAIN=

View file

@ -57,6 +57,7 @@ ram.runtime = "50M"
[resources.system_user] [resources.system_user]
allow_email = true
[resources.install_dir] [resources.install_dir]

View file

@ -9,9 +9,8 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
admin_mail=$(ynh_user_get_info --username=$admin --key=username)
key=$(ynh_string_random --length=32) key=$(ynh_string_random --length=32)
ynh_app_setting_set --app=$app --key=key --value=$key
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE

View file

@ -13,7 +13,11 @@ source /usr/share/yunohost/helpers
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
admin_mail=$(ynh_user_get_info --username=$admin --key=username) # uncomment me after some updates whenever the key variable is set in install for some times
#key=$(ynh_app_setting_get --app=$app --key=key --value=$key)
#remove me when key setting is uncommented (see above)
key=$(ynh_string_random --length=32)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
@ -48,6 +52,17 @@ chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
#=================================================
# CONFIGURE THE INSTALL SCRIPT
#=================================================
ynh_script_progression --message="Upgrading .env file..." --weight=1
ynh_add_config --template="../conf/.env.production" --destination="$install_dir/.env"
chmod 600 $install_dir/.env
chown $app: "$install_dir/.env"
set -a; source "$install_dir/.env"; set +a
#================================================= #=================================================
# CONFIGURE THEN INSTALL SCRIPT AND DEPENDENCIES # CONFIGURE THEN INSTALL SCRIPT AND DEPENDENCIES