From bc044754bd053041bd83e6738388dc3d0c1cf738 Mon Sep 17 00:00:00 2001 From: Michael Braunoeder Date: Tue, 1 Oct 2019 08:06:35 +0200 Subject: [PATCH] save rcode0 url only if not default --- dnsapi/dns_rcode0.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dnsapi/dns_rcode0.sh b/dnsapi/dns_rcode0.sh index fc838e76..9ed20e68 100755 --- a/dnsapi/dns_rcode0.sh +++ b/dnsapi/dns_rcode0.sh @@ -40,10 +40,13 @@ dns_rcode0_add() { RCODE0_TTL="$DEFAULT_RCODE0_TTL" fi - #save the api addr and key to the account conf file. - _saveaccountconf_mutable RCODE0_URL "$RCODE0_URL" + #save the token to the account conf file. _saveaccountconf_mutable RCODE0_API_TOKEN "$RCODE0_API_TOKEN" + if [ "$RCODE0_URL" != "$DEFAULT_RCODE0_URL" ]; then + _saveaccountconf_mutable RCODE0_URL "$RCODE0_URL" + fi + if [ "$RCODE0_TTL" != "$DEFAULT_RCODE0_TTL" ]; then _saveaccountconf_mutable RCODE0_TTL "$RCODE0_TTL" fi