save rcode0 url only if not default

This commit is contained in:
Michael Braunoeder 2019-10-01 08:06:35 +02:00
parent 6eb7936779
commit bc044754bd

View File

@ -40,10 +40,13 @@ dns_rcode0_add() {
RCODE0_TTL="$DEFAULT_RCODE0_TTL" RCODE0_TTL="$DEFAULT_RCODE0_TTL"
fi fi
#save the api addr and key to the account conf file. #save the token to the account conf file.
_saveaccountconf_mutable RCODE0_URL "$RCODE0_URL"
_saveaccountconf_mutable RCODE0_API_TOKEN "$RCODE0_API_TOKEN" _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 if [ "$RCODE0_TTL" != "$DEFAULT_RCODE0_TTL" ]; then
_saveaccountconf_mutable RCODE0_TTL "$RCODE0_TTL" _saveaccountconf_mutable RCODE0_TTL "$RCODE0_TTL"
fi fi