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

refactor to use config_panel

This commit is contained in:
Thomas 2023-09-05 13:53:50 +02:00 committed by GitHub
parent 1865f2f496
commit f8b40179a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 8 deletions

View file

@ -24,8 +24,8 @@ REDIS_URL=redis://
# Emails # Emails
UI_URL=__DOMAIN__ UI_URL=__DOMAIN__
EMAIL_URL=smtp://__ADMIN__:__PASSWORD__@__MAIN_DOMAIN__:587/?tls=True EMAIL_URL=smtp://__USER_MAIL__:__MAIL_PASSWORD__@__MAIL_DOMAIN__:587/?tls=True
SENDER_EMAIL=__ADMIN__@__MAIN_DOMAIN__ SENDER_EMAIL=__USER_MAIL__@__MAIL_DOMAIN__
# WORKERS_PROCESSES= # WORKERS_PROCESSES=
# Workouts # Workouts

View file

@ -44,4 +44,28 @@ services = ["__APP__", "__APP___workers"]
help.fr = "Insérer la clé api donnée par le fournisseur météo choisi" help.fr = "Insérer la clé api donnée par le fournisseur météo choisi"
bind = "WEATHER_API_KEY:/var/www/__APP__/.env" bind = "WEATHER_API_KEY:/var/www/__APP__/.env"
[main.config.USER_MAIL]
ask.en = "Configure the user mail"
ask.fr = "Configurer le courriel utilisateur"
type = "string"
bind = "USER_MAIL:/var/www/__APP__/.env"
[main.config.MAIL_PASSWORD]
ask.en = "Configure the password of the determined mail user"
ask.fr = "Configurer le mot de passe de lutilisateur mail choisi"
type = "string"
bind = "MAIL_PASSWORD:/var/www/__APP__/.env"
[main.config.MAIL_DOMAIN]
ask.en = "Configure the server address"
ask.fr = "Configurer ladresse du serveur"
type = "string"
help.en = "e.g. mydomain.com"
help.fr = "ex.: mondomain.com"
bind = "MAIL_DOMAIN:/var/www/__APP__/.env"

View file

@ -11,9 +11,9 @@ source /usr/share/yunohost/helpers
admin=$(ynh_user_get_info --username=$admin --key=username) admin=$(ynh_user_get_info --username=$admin --key=username)
admin_mail=$(ynh_user_get_info --username=$admin --key=mail) admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
user_mail=$($app)
# Retrieve YunoHost main domain mail_password=$($mail_pwd)
main_domain=$(cat /etc/yunohost/current_host) mail_domain=$($domain)
#================================================= #=================================================
# LOGROTATE # LOGROTATE

View file

@ -16,9 +16,6 @@ source /usr/share/yunohost/helpers
admin=$(ynh_user_get_info --username=$admin --key=username) admin=$(ynh_user_get_info --username=$admin --key=username)
admin_mail=$(ynh_user_get_info --username=$admin --key=mail) admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
# Retrieve YunoHost main domain
main_domain=$(cat /etc/yunohost/current_host)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================