mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
add in config panel avalaibity to disable emails bug boolean
This commit is contained in:
parent
344fe4a8b4
commit
93613d8864
3 changed files with 5 additions and 3 deletions
|
@ -22,7 +22,9 @@ name.fr = "Configuration SMTP"
|
|||
|
||||
[main.smtp.disable_email]
|
||||
ask.fr = "Désactiver l'envoi des mails (non par défaut)"
|
||||
type = "boolean"
|
||||
type = "string"
|
||||
choices.false = "faux par défaut"
|
||||
choices.true = "vrai, désactive l'envoi des mails"
|
||||
bind = "DISABLE_EMAIL:__INSTALL_DIR__/config.local.php"
|
||||
|
||||
[main.smtp.smtp_host]
|
||||
|
|
|
@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
|
|||
secret_key=$(ynh_string_random --length=50)
|
||||
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
|
||||
|
||||
ynh_app_setting_set --app=$app --key=smtp_disable_email --value=0
|
||||
ynh_app_setting_set --app=$app --key=smtp_disable_email --value=false
|
||||
ynh_app_setting_set --app=$app --key=smtp_host --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=smtp_port --value=25
|
||||
ynh_app_setting_set --app=$app --key=smtp_user --value=$app
|
||||
|
|
|
@ -43,7 +43,7 @@ if [ -z "${smtp_host:-}" ]; then
|
|||
ynh_replace_string --match_string="const SMTP_" --replace_string="//const SMTP_" --target_file=$user_conf
|
||||
ynh_replace_string --match_string="const MAIL_" --replace_string="//const MAIL_" --target_file=$user_conf
|
||||
else
|
||||
disable_email=0
|
||||
disable_email=false
|
||||
smtp_host=$domain
|
||||
smtp_port=25
|
||||
smtp_user=$app
|
||||
|
|
Loading…
Add table
Reference in a new issue