Browse Source

Fix syntax for OpenBSD sh

pull/6099/head
Kirill A. Korinsky 1 month ago
parent
commit
3b8608761b
No known key found for this signature in database GPG Key ID: 98D8D9867759226E
  1. 6
      dnsapi/dns_netcup.sh
  2. 2
      notify/aws_ses.sh

6
dnsapi/dns_netcup.sh

@ -19,7 +19,7 @@ client=""
dns_netcup_add() { dns_netcup_add() {
_debug NC_Apikey "$NC_Apikey" _debug NC_Apikey "$NC_Apikey"
login
_login
if [ "$NC_Apikey" = "" ] || [ "$NC_Apipw" = "" ] || [ "$NC_CID" = "" ]; then if [ "$NC_Apikey" = "" ] || [ "$NC_Apipw" = "" ] || [ "$NC_CID" = "" ]; then
_err "No Credentials given" _err "No Credentials given"
return 1 return 1
@ -61,7 +61,7 @@ dns_netcup_add() {
} }
dns_netcup_rm() { dns_netcup_rm() {
login
_login
fulldomain=$1 fulldomain=$1
txtvalue=$2 txtvalue=$2
@ -125,7 +125,7 @@ dns_netcup_rm() {
logout logout
} }
login() {
_login() {
tmp=$(_post "{\"action\": \"login\", \"param\": {\"apikey\": \"$NC_Apikey\", \"apipassword\": \"$NC_Apipw\", \"customernumber\": \"$NC_CID\"}}" "$end" "" "POST") 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) sid=$(echo "$tmp" | tr '{}' '\n' | grep apisessionid | cut -d '"' -f 4)
_debug "$tmp" _debug "$tmp"

2
notify/aws_ses.sh

@ -89,7 +89,7 @@ _use_metadata() {
_normalizeJson | _normalizeJson |
tr '{,}' '\n' | tr '{,}' '\n' |
while read -r _line; do while read -r _line; do
_key="$(echo "${_line%%:*}" | tr -d '"')"
_key="$(echo "${_line%%:*}" | tr -d \")"
_value="${_line#*:}" _value="${_line#*:}"
_debug3 "_key" "$_key" _debug3 "_key" "$_key"
_secure_debug3 "_value" "$_value" _secure_debug3 "_value" "$_value"

Loading…
Cancel
Save