From 08cbd66de3a19fa8f7d1d72b43db052fd8574a31 Mon Sep 17 00:00:00 2001 From: rodinux Date: Sun, 18 Aug 2024 20:45:23 +0200 Subject: [PATCH] debug values config panel --- conf/config.local.php | 3 +-- config_panel.toml | 4 ---- scripts/install | 13 ++++++------- scripts/upgrade | 3 --- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/conf/config.local.php b/conf/config.local.php index f629a52..99641b6 100644 --- a/conf/config.local.php +++ b/conf/config.local.php @@ -583,8 +583,7 @@ const SMTP_SECURITY = '__SMTP_SECURITY__'; * Défaut : null */ -const MAIL_RETURN_PATH = '__MAIL_RETURN_PATH__'; - +//const MAIL_RETURN_PATH = 'returns@monserveur.com'; /** * Adresse e-mail expéditrice des messages (Sender) diff --git a/config_panel.toml b/config_panel.toml index cc56fb7..7b42240 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -55,7 +55,3 @@ name.fr = "Configuration SMTP" type = "string" bind = "MAIL_SENDER:__INSTALL_DIR__/config.local.php" - [main.smtp.mail_return_path] - ask.fr = "Adresse e-mail destinée à recevoir les erreurs de mail" - type = "string" - bind = "MAIL_RETURN_PATH:__INSTALL_DIR__/config.local.php" diff --git a/scripts/install b/scripts/install index 772ec46..d3a1c28 100644 --- a/scripts/install +++ b/scripts/install @@ -12,6 +12,12 @@ 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_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 +ynh_app_setting_set --app=$app --key=smtp_password --value=$mail_pwd +ynh_app_setting_set --app=$app --key=smtp_security --value=STARTTLS +ynh_app_setting_set --app=$app --key=mail_sender --value=$app@$domain #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -53,13 +59,6 @@ ynh_add_config --template="config.local.php" --destination="$install_dir/config. chmod 440 "$install_dir/config.local.php" chown $app:$app "$install_dir/config.local.php" -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 -ynh_app_setting_set --app=$app --key=smtp_password --value=$mail_pwd -ynh_app_setting_set --app=$app --key=smtp_security --value=STARTTLS -ynh_app_setting_set --app=$app --key=mail_return_path --value=$app@$domain -ynh_app_setting_set --app=$app --key=mail_sender --value=$app@$domain #================================================= # SETUP APPLICATION WITH CURL diff --git a/scripts/upgrade b/scripts/upgrade index c40a6c3..63c308f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -37,7 +37,6 @@ if [ -z "${smtp_host:-}" ]; then smtp_user=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_USER) smtp_password=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_PASSWORD) smtp_security=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_SECURITY) - mail_return_path=$(ynh_read_var_in_file --file=$user_conf --key=MAIL_RETURN_PATH) mail_sender=$(ynh_read_var_in_file --file=$user_conf --key=MAIL_SENDER) 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 @@ -47,7 +46,6 @@ if [ -z "${smtp_host:-}" ]; then smtp_user=$app smtp_password=$mail_pwd smtp_security=STARTTLS - mail_return_path=$app@$domain mail_sender=$app@$domain fi ynh_app_setting_set --app=$app --key=smtp_host --value=$smtp_host @@ -55,7 +53,6 @@ if [ -z "${smtp_host:-}" ]; then ynh_app_setting_set --app=$app --key=smtp_user --value=$smtp_user ynh_app_setting_set --app=$app --key=smtp_password --value=$smtp_password ynh_app_setting_set --app=$app --key=smtp_security --value=$smtp_security - ynh_app_setting_set --app=$app --key=mail_return_path --value=$mail_return_path ynh_app_setting_set --app=$app --key=mail_sender --value=$mail_sender fi