1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/paheko_ynh.git synced 2024-09-03 19:56:22 +02:00

debug values config panel

This commit is contained in:
rodinux 2024-08-18 20:45:23 +02:00
parent c84a856fd0
commit 08cbd66de3
4 changed files with 7 additions and 16 deletions

View file

@ -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)

View file

@ -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"

View file

@ -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

View file

@ -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