From a3c8958f169137c9921d10f495efb6bf1613c47f Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Mon, 1 Jan 2024 00:39:15 +0100 Subject: [PATCH] fix ynh_write_var_in_file --- scripts/config | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/config b/scripts/config index 4c0f42f..6bbfdca 100644 --- a/scripts/config +++ b/scripts/config @@ -74,7 +74,7 @@ set__dns_over_https() { fi # save the new setting in the AGH config file - ynh_write_var_in_file --file="$install_dir/AdGuardHome.yaml" --key="enabled" --after="tls" --value="$dns_over_https" + ynh_write_var_in_file --file="$install_dir/AdGuardHome.yaml" --key="enabled" --after="tls:" --value="$dns_over_https" # save the new setting in YNH ynh_app_setting_set --app="$app" --key=dns_over_https --value="$dns_over_https" diff --git a/scripts/upgrade b/scripts/upgrade index 8dbfc8c..5e8eba0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -64,7 +64,7 @@ fi # fill the 'tls:' section of the AGH configuration if necessary if grep -q "certificate_path: \"\"" "$install_dir/AdGuardHome.yaml" || grep -q "private_key_path: \"\"" "$install_dir/AdGuardHome.yaml" || grep -q "server_name: \"\"" "$install_dir/AdGuardHome.yaml"; then - ynh_write_var_in_file --file="$install_dir/AdGuardHome.yaml" --key="tls>enabled" --value="$dns_over_https" + ynh_write_var_in_file --file="$install_dir/AdGuardHome.yaml" --key="enabled" --after="tls:" --value="$dns_over_https" ynh_write_var_in_file --file="$install_dir/AdGuardHome.yaml" --key="server_name" --value="$domain" ynh_write_var_in_file --file="$install_dir/AdGuardHome.yaml" --key="allow_unencrypted_doh" --value="true" ynh_write_var_in_file --file="$install_dir/AdGuardHome.yaml" --key="certificate_path" --value="/etc/yunohost/certs/$domain/crt.pem"