Skip to content

Commit

Permalink
Fix syntax for OpenBSD sh
Browse files Browse the repository at this point in the history
  • Loading branch information
catap committed Nov 15, 2024
1 parent 4e0686f commit 78511b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions dnsapi/dns_netcup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ client=""

dns_netcup_add() {
_debug NC_Apikey "$NC_Apikey"
login
_login
if [ "$NC_Apikey" = "" ] || [ "$NC_Apipw" = "" ] || [ "$NC_CID" = "" ]; then
_err "No Credentials given"
return 1
Expand Down Expand Up @@ -61,7 +61,7 @@ dns_netcup_add() {
}

dns_netcup_rm() {
login
_login
fulldomain=$1
txtvalue=$2

Expand Down Expand Up @@ -125,7 +125,7 @@ dns_netcup_rm() {
logout
}

login() {
_login() {
tmp=$(_post "{\"action\": \"login\", \"param\": {\"apikey\": \"$NC_Apikey\", \"apipassword\": \"$NC_Apipw\", \"customernumber\": \"$NC_CID\"}}" "$end" "" "POST")
sid=$(echo "$tmp" | tr '{}' '\n' | grep apisessionid | cut -d '"' -f 4)
_debug "$tmp"
Expand All @@ -134,7 +134,7 @@ login() {
return 1
fi
}
logout() {
_logout() {
tmp=$(_post "{\"action\": \"logout\", \"param\": {\"apikey\": \"$NC_Apikey\", \"apisessionid\": \"$sid\", \"customernumber\": \"$NC_CID\"}}" "$end" "" "POST")
_debug "$tmp"
if [ "$(_getfield "$tmp" "4" | sed s/\"status\":\"//g | sed s/\"//g)" != "success" ]; then
Expand Down
2 changes: 1 addition & 1 deletion notify/aws_ses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ _use_metadata() {
_normalizeJson |
tr '{,}' '\n' |
while read -r _line; do
_key="$(echo "${_line%%:*}" | tr -d '"')"
_key="$(echo "${_line%%:*}" | tr -d \")"
_value="${_line#*:}"
_debug3 "_key" "$_key"
_secure_debug3 "_value" "$_value"
Expand Down

0 comments on commit 78511b1

Please sign in to comment.