Browse Source
Merge pull request #2284 from devNan0/fix_netcup_parsing_on_bsd
dnsapi: netcup: Fix sessionid parsing on BSD
dnsconf
neil
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
dnsapi/dns_netcup.sh
|
@ -117,7 +117,7 @@ dns_netcup_rm() { |
|
|
|
|
|
|
|
|
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=$(_getfield "$tmp" "8" | sed s/\"responsedata\":\{\"apisessionid\":\"//g | sed 's/\"\}\}//g') |
|
|
|
|
|
|
|
|
sid=$(echo "$tmp" | tr '{}' '\n' | grep apisessionid | cut -d '"' -f 4) |
|
|
_debug "$tmp" |
|
|
_debug "$tmp" |
|
|
if [ "$(_getfield "$msg" "4" | sed s/\"status\":\"//g | sed s/\"//g)" != "success" ]; then |
|
|
if [ "$(_getfield "$msg" "4" | sed s/\"status\":\"//g | sed s/\"//g)" != "success" ]; then |
|
|
_err "$msg" |
|
|
_err "$msg" |
|
|