1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/adguardhome_ynh.git synced 2024-09-03 18:06:23 +02:00

fix ynh_write_var_in_file

This commit is contained in:
OniriCorpe 2024-01-01 00:39:15 +01:00
parent 90c6a6ce66
commit a3c8958f16
2 changed files with 2 additions and 2 deletions

View file

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

View file

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