mirror of
https://github.com/YunoHost-Apps/gotosocial_ynh.git
synced 2024-09-03 19:16:06 +02:00
added parameters related to SMTP configuration
This commit is contained in:
parent
7d1cfdb43f
commit
34211ba683
4 changed files with 58 additions and 11 deletions
|
@ -294,8 +294,8 @@ ask.en = "SMTP Server Hostname"
|
|||
ask.fr = "Nom d'hôte du serveur SMTP"
|
||||
bind = "smtp-host:__FINALPATH__/config.yaml"
|
||||
default = "localhost"
|
||||
help.en = "The hostname of the smtp server you want to use. Examples: mail.example.org, localhost"
|
||||
help.fr = "Le nom d'hôte du serveur smtp que vous souhaitez utiliser. Exemples: mail.example.org, localhost"
|
||||
help.en = "The hostname of the SMTP server you want to use. Examples: mail.example.org, localhost"
|
||||
help.fr = "Le nom d'hôte du serveur SMTP que vous souhaitez utiliser. Exemples: mail.example.org, localhost"
|
||||
type = "string"
|
||||
|
||||
[main.smtp.smtp_port]
|
||||
|
@ -303,8 +303,8 @@ ask.en = "SMTP Port"
|
|||
ask.fr = "Port SMTP"
|
||||
bind = "smtp-port:__FINALPATH__/config.yaml"
|
||||
default = "25"
|
||||
help.en = "Port to use to connect to the smtp server"
|
||||
help.fr = "Port à utiliser pour se connecter au serveur smtp"
|
||||
help.en = "Port to use to connect to the SMTP server"
|
||||
help.fr = "Port à utiliser pour se connecter au serveur SMTP"
|
||||
type = "number"
|
||||
|
||||
[main.smtp.smtp_username]
|
||||
|
@ -312,8 +312,8 @@ ask.en = "SMTP Username"
|
|||
ask.fr = "Nom d'utilisateur SMTP"
|
||||
bind = "smtp-username:__FINALPATH__/config.yaml"
|
||||
default = ""
|
||||
help.en = "Username to use when authenticating with the smtp server"
|
||||
help.fr = "Nom d'utilisateur à utiliser lors de l'authentification avec le serveur smtp"
|
||||
help.en = "Username to use when authenticating with the SMTP server"
|
||||
help.fr = "Nom d'utilisateur à utiliser lors de l'authentification avec le serveur SMTP"
|
||||
type = "string"
|
||||
|
||||
[main.smtp.smtp_password]
|
||||
|
@ -321,8 +321,8 @@ ask.en = "SMTP Password"
|
|||
ask.fr = "Mot de passe SMTP"
|
||||
bind = "smtp-password:__FINALPATH__/config.yaml"
|
||||
default = ""
|
||||
help.en = "Password to use when authenticating with the smtp server"
|
||||
help.fr = "Mot de passe à utiliser lors de l'authentification avec le serveur smtp"
|
||||
help.en = "Password to use when authenticating with the SMTP server"
|
||||
help.fr = "Mot de passe à utiliser lors de l'authentification avec le serveur SMTP"
|
||||
type = "password"
|
||||
|
||||
[main.smtp.smtp_from]
|
||||
|
@ -331,7 +331,7 @@ ask.fr = "Adresse d'expédition SMTP"
|
|||
bind = "smtp-from:__FINALPATH__/config.yaml"
|
||||
default = "GoToSocial@__DOMAIN__"
|
||||
help.en = "From address for sent emails"
|
||||
help.fr = "De l'adresse pour les e-mails envoyés"
|
||||
help.fr = "L'adresse utilisée pour les e-mails envoyés"
|
||||
type = "email"
|
||||
|
||||
[main.smtp.smtp_disclose_recipients]
|
||||
|
@ -342,8 +342,8 @@ choices = ["true", "false"]
|
|||
default = "false"
|
||||
help.en = """true: Disclose all recipients in the To field\
|
||||
false: Email will be sent to Undisclosed Recipients"""
|
||||
help.fr = """vrai : divulguer tous les destinataires dans le champ À\
|
||||
false : l'e-mail sera envoyé aux destinataires non divulgués"""
|
||||
help.fr = """true : divulguer tous les destinataires dans le champ À\
|
||||
false : l'e-mail sera envoyé sans divulguer les destinataires"""
|
||||
type = "select"
|
||||
|
||||
####################
|
||||
|
|
|
@ -71,6 +71,13 @@ statuses_poll_max_options="6"
|
|||
statuses_poll_option_max_chars="50"
|
||||
statuses_media_max_files="6"
|
||||
|
||||
smtp_host="localhost"
|
||||
smtp_port="25"
|
||||
smtp_username=""
|
||||
smtp_password=""
|
||||
smtp_from="noreply@$domain"
|
||||
smtp_disclose_recipients="false"
|
||||
|
||||
advanced_cookies_samesite="lax"
|
||||
advanced_rate_limit_requests="300"
|
||||
|
||||
|
@ -135,6 +142,13 @@ ynh_app_setting_set --app="$app" --key=statuses_poll_max_options --value="$statu
|
|||
ynh_app_setting_set --app="$app" --key=statuses_poll_option_max_chars --value="$statuses_poll_option_max_chars"
|
||||
ynh_app_setting_set --app="$app" --key=statuses_media_max_files --value="$statuses_media_max_files"
|
||||
|
||||
ynh_app_setting_set --app="$app" --key=smtp_host --value="$smtp_host"
|
||||
ynh_app_setting_set --app="$app" --key=smtp_port --value="$smtp_port"
|
||||
ynh_app_setting_set --app="$app" --key=smtp_username --value="$smtp_username"
|
||||
ynh_app_setting_set --app="$app" --key=smtp_password --value="$smtp_password"
|
||||
ynh_app_setting_set --app="$app" --key=smtp_from --value="$smtp_from"
|
||||
ynh_app_setting_set --app="$app" --key=smtp_disclose_recipients --value="$smtp_disclose_recipients"
|
||||
|
||||
ynh_app_setting_set --app="$app" --key=advanced_cookies_samesite --value="$advanced_cookies_samesite"
|
||||
ynh_app_setting_set --app="$app" --key=advanced_rate_limit_requests --value="$advanced_rate_limit_requests"
|
||||
|
||||
|
|
|
@ -76,6 +76,13 @@ statuses_poll_max_options=$(ynh_app_setting_get --app="$app" --key=statuses_poll
|
|||
statuses_poll_option_max_chars=$(ynh_app_setting_get --app="$app" --key=statuses_poll_option_max_chars)
|
||||
statuses_media_max_files=$(ynh_app_setting_get --app="$app" --key=statuses_media_max_files)
|
||||
|
||||
smtp_host=$(ynh_app_setting_get --app="$app" --key=smtp_host)
|
||||
smtp_port=$(ynh_app_setting_get --app="$app" --key=smtp_port)
|
||||
smtp_username=$(ynh_app_setting_get --app="$app" --key=smtp_username)
|
||||
smtp_password=$(ynh_app_setting_get --app="$app" --key=smtp_password)
|
||||
smtp_from=$(ynh_app_setting_get --app="$app" --key=smtp_from)
|
||||
smtp_disclose_recipients=$(ynh_app_setting_get --app="$app" --key=smtp_disclose_recipients)
|
||||
|
||||
advanced_cookies_samesite=$(ynh_app_setting_get --app="$app" --key=advanced_cookies_samesite)
|
||||
advanced_rate_limit_requests=$(ynh_app_setting_get --app="$app" --key=advanced_rate_limit_requests)
|
||||
|
||||
|
|
|
@ -64,6 +64,13 @@ statuses_poll_max_options=$(ynh_app_setting_get --app="$app" --key=statuses_poll
|
|||
statuses_poll_option_max_chars=$(ynh_app_setting_get --app="$app" --key=statuses_poll_option_max_chars)
|
||||
statuses_media_max_files=$(ynh_app_setting_get --app="$app" --key=statuses_media_max_files)
|
||||
|
||||
smtp_host=$(ynh_app_setting_get --app="$app" --key=smtp_host)
|
||||
smtp_port=$(ynh_app_setting_get --app="$app" --key=smtp_port)
|
||||
smtp_username=$(ynh_app_setting_get --app="$app" --key=smtp_username)
|
||||
smtp_password=$(ynh_app_setting_get --app="$app" --key=smtp_password)
|
||||
smtp_from=$(ynh_app_setting_get --app="$app" --key=smtp_from)
|
||||
smtp_disclose_recipients=$(ynh_app_setting_get --app="$app" --key=smtp_disclose_recipients)
|
||||
|
||||
advanced_cookies_samesite=$(ynh_app_setting_get --app="$app" --key=advanced_cookies_samesite)
|
||||
advanced_rate_limit_requests=$(ynh_app_setting_get --app="$app" --key=advanced_rate_limit_requests)
|
||||
|
||||
|
@ -238,6 +245,25 @@ then
|
|||
ynh_app_setting_set --app="$app" --key=instance_expose_suspended_web --value="$instance_expose_suspended_web"
|
||||
fi
|
||||
|
||||
# Upgrade from <0.8.0~ynh2:
|
||||
if ynh_compare_current_package_version --comparison lt --version 0.8.0~ynh2 || [ -z "$smtp_host" ]
|
||||
then
|
||||
# declaration of new parameter
|
||||
smtp_host="localhost"
|
||||
smtp_port="25"
|
||||
smtp_username=""
|
||||
smtp_password=""
|
||||
smtp_from="GoToSocial@$domain"
|
||||
smtp_disclose_recipients="false"
|
||||
# registration of parameters
|
||||
ynh_app_setting_set --app="$app" --key=smtp_host --value="$smtp_host"
|
||||
ynh_app_setting_set --app="$app" --key=smtp_port --value="$smtp_port"
|
||||
ynh_app_setting_set --app="$app" --key=smtp_username --value="$smtp_username"
|
||||
ynh_app_setting_set --app="$app" --key=smtp_password --value="$smtp_password"
|
||||
ynh_app_setting_set --app="$app" --key=smtp_from --value="$smtp_from"
|
||||
ynh_app_setting_set --app="$app" --key=smtp_disclose_recipients --value="$smtp_disclose_recipients"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue