fix shellcheck warnings

This commit is contained in:
neilpang
2016-11-11 23:30:14 +08:00
parent 031e885e4d
commit c7b16249b8
10 changed files with 108 additions and 108 deletions

View File

@@ -14,9 +14,9 @@ dns_lexicon_add() {
fulldomain=$1
txtvalue=$2
domain=$(printf "$fulldomain" | cut -d . -f 2-999)
domain=$(printf "%s" "$fulldomain" | cut -d . -f 2-999)
if ! _exists $lexicon_cmd; then
if ! _exists "$lexicon_cmd"; then
_err "Please install $lexicon_cmd first: $wiki"
return 1
fi
@@ -33,7 +33,7 @@ dns_lexicon_add() {
eval Lx_name_v="\$$Lx_name"
_debug "$Lx_name" "$Lx_name_v"
if [ "$Lx_name_v" ]; then
_saveaccountconf $Lx_name "$Lx_name_v"
_saveaccountconf "$Lx_name" "$Lx_name_v"
export "$Lx_name"
fi
@@ -41,7 +41,7 @@ dns_lexicon_add() {
eval Lx_token_v="\$$Lx_token"
_debug "$Lx_token" "$Lx_token_v"
if [ "$Lx_token_v" ]; then
_saveaccountconf $Lx_token "$Lx_token_v"
_saveaccountconf "$Lx_token" "$Lx_token_v"
export "$Lx_token"
fi
@@ -49,7 +49,7 @@ dns_lexicon_add() {
eval Lx_password_v="\$$Lx_password"
_debug "$Lx_password" "$Lx_password_v"
if [ "$Lx_password_v" ]; then
_saveaccountconf $Lx_password "$Lx_password_v"
_saveaccountconf "$Lx_password" "$Lx_password_v"
export "$Lx_password"
fi
@@ -58,7 +58,7 @@ dns_lexicon_add() {
_debug "$Lx_domaintoken" "$Lx_domaintoken_v"
if [ "$Lx_domaintoken_v" ]; then
export "$Lx_domaintoken"
_saveaccountconf $Lx_domaintoken "$Lx_domaintoken_v"
_saveaccountconf "$Lx_domaintoken" "$Lx_domaintoken_v"
fi
$lexicon_cmd "$PROVIDER" create ${domain} TXT --name="_acme-challenge.${domain}." --content="${txtvalue}"