mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
forget the fonction disable email for now in config panel
This commit is contained in:
parent
1f96808ed7
commit
8cd924cb15
3 changed files with 0 additions and 9 deletions
|
@ -20,11 +20,6 @@ name.fr = "Configuration SMTP"
|
||||||
|
|
||||||
optional = false
|
optional = false
|
||||||
|
|
||||||
[main.smtp.disable_email]
|
|
||||||
ask.fr = "Désactiver l'envoi des mails (non par défaut)"
|
|
||||||
type = "boolean"
|
|
||||||
bind = "DISABLE_EMAIL:__INSTALL_DIR__/config.local.php"
|
|
||||||
|
|
||||||
[main.smtp.smtp_host]
|
[main.smtp.smtp_host]
|
||||||
ask.fr = "Serveur SMTP"
|
ask.fr = "Serveur SMTP"
|
||||||
type = "string"
|
type = "string"
|
||||||
|
|
|
@ -12,7 +12,6 @@ source /usr/share/yunohost/helpers
|
||||||
secret_key=$(ynh_string_random --length=50)
|
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=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_host --value=$domain
|
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_port --value=25
|
||||||
ynh_app_setting_set --app=$app --key=smtp_user --value=$app
|
ynh_app_setting_set --app=$app --key=smtp_user --value=$app
|
||||||
|
|
|
@ -32,7 +32,6 @@ fi
|
||||||
if [ -z "${smtp_host:-}" ]; then
|
if [ -z "${smtp_host:-}" ]; then
|
||||||
user_conf="$data_dir/data/config.local.user.php"
|
user_conf="$data_dir/data/config.local.user.php"
|
||||||
if [ -f $user_conf ]; then
|
if [ -f $user_conf ]; then
|
||||||
disable_email=$(ynh_read_var_in_file --file=$user_conf --key=DISABLE_EMAIL)
|
|
||||||
smtp_host=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_HOST)
|
smtp_host=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_HOST)
|
||||||
smtp_port=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_PORT)
|
smtp_port=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_PORT)
|
||||||
smtp_user=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_USER)
|
smtp_user=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_USER)
|
||||||
|
@ -43,7 +42,6 @@ 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 SMTP_" --replace_string="//const SMTP_" --target_file=$user_conf
|
||||||
ynh_replace_string --match_string="const MAIL_" --replace_string="//const MAIL_" --target_file=$user_conf
|
ynh_replace_string --match_string="const MAIL_" --replace_string="//const MAIL_" --target_file=$user_conf
|
||||||
else
|
else
|
||||||
disable_email=0
|
|
||||||
smtp_host=$domain
|
smtp_host=$domain
|
||||||
smtp_port=25
|
smtp_port=25
|
||||||
smtp_user=$app
|
smtp_user=$app
|
||||||
|
@ -52,7 +50,6 @@ if [ -z "${smtp_host:-}" ]; then
|
||||||
mail_return_path=$app@$domain
|
mail_return_path=$app@$domain
|
||||||
mail_sender=$app@$domain
|
mail_sender=$app@$domain
|
||||||
fi
|
fi
|
||||||
ynh_app_setting_set --app=$app --key=disable_email --value=$disable_email
|
|
||||||
ynh_app_setting_set --app=$app --key=smtp_host --value=$smtp_host
|
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_port --value=$smtp_port
|
||||||
ynh_app_setting_set --app=$app --key=smtp_user --value=$smtp_user
|
ynh_app_setting_set --app=$app --key=smtp_user --value=$smtp_user
|
||||||
|
|
Loading…
Add table
Reference in a new issue