Browse Source

shellcheck fixes

pull/1841/head
Oleg Zaikin 7 years ago
parent
commit
37c3176945
  1. 8
      dnsapi/dns_clodo.sh

8
dnsapi/dns_clodo.sh

@ -110,8 +110,8 @@ _clodo_init() {
_get $CLODO_AUTH_URL "onlyheader" _get $CLODO_AUTH_URL "onlyheader"
CLODO_TOKEN=$(grep "^X-Auth-Token" $HTTP_HEADER | tr -d "\r" | cut -d " " -f 2)
CLODO_API=$(grep "^X-Server-Management-Url" $HTTP_HEADER | tr -d "\r" | cut -d " " -f 2)
CLODO_TOKEN=$(grep "^X-Auth-Token" "$HTTP_HEADER" | tr -d "\r" | cut -d " " -f 2)
CLODO_API=$(grep "^X-Server-Management-Url" "$HTTP_HEADER" | tr -d "\r" | cut -d " " -f 2)
if [ -z "$CLODO_TOKEN" ] || [ -z "$CLODO_API" ]; then if [ -z "$CLODO_TOKEN" ] || [ -z "$CLODO_API" ]; then
_err "Authentication error" _err "Authentication error"
@ -168,7 +168,9 @@ _clodo_rest() {
else else
response="$(_get "$CLODO_API/$ep")" response="$(_get "$CLODO_API/$ep")"
fi fi
if [ "$?" != "0" ]; then
_ret=$?
if [ "$_ret" != "0" ]; then
_err "error $ep" _err "error $ep"
return 1 return 1
fi fi

Loading…
Cancel
Save