From fa5f2f2c3449d1d7e51a8bff4450980436fedd5c Mon Sep 17 00:00:00 2001 From: flywithu <34819252+flywithu@users.noreply.github.com> Date: Wed, 2 Sep 2020 07:13:56 +0900 Subject: [PATCH] fix shfmt --- dnsapi/dns_dnsever.sh | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/dnsapi/dns_dnsever.sh b/dnsapi/dns_dnsever.sh index bc9d6c1a..35870e61 100755 --- a/dnsapi/dns_dnsever.sh +++ b/dnsapi/dns_dnsever.sh @@ -21,29 +21,26 @@ dns_dnsever_add() { _debug fulldomain "$fulldomain" _debug txtvalue "$txtvalue" - DNSEVER_ID="${DNSEVER_ID:-$(_readaccountconf_mutable DNSEVER_ID)}" DNSEVER_PW="${DNSEVER_PW:-$(_readaccountconf_mutable DNSEVER_PW)}" - + if [ "$DNSEVER_ID" ]; then - _saveaccountconf_mutable DNSEVER_ID "$DNSEVER_ID" - _saveaccountconf_mutable DNSEVER_PW "$DNSEVER_PW" - + _saveaccountconf_mutable DNSEVER_ID "$DNSEVER_ID" + _saveaccountconf_mutable DNSEVER_PW "$DNSEVER_PW" + else if [ -z "$DNSEVER_ID" ] || [ -z "$DNSEVER_PW" ]; then DNSEVER_ID="" DNSEVER_PW="" _err "You didn't specify a DNSEVER ID and PW yet." return 1 - fi - + fi + fi dnsever_domain_txt "add" "$DNSEVER_ID" "$DNSEVER_PW" "$fulldomain" "$txtvalue" #save the api key and email to the account conf file. - - return $? } @@ -55,11 +52,10 @@ dns_dnsever_rm() { _info "Using dnsever remove" _debug fulldomain "$fulldomain" _debug txtvalue "$txtvalue" - - + DNSEVER_ID="${DNSEVER_ID:-$(_readaccountconf_mutable DNSEVER_ID)}" DNSEVER_PW="${DNSEVER_PW:-$(_readaccountconf_mutable DNSEVER_PW)}" - + if [ -z "$DNSEVER_ID" ] || [ -z "$DNSEVER_PW" ]; then DNSEVER_ID="" DNSEVER_PW=""