Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
50d5c4b9
Commit
50d5c4b9
authored
May 22, 2019
by
devNan0
Browse files
Fix sessionid parsing on BSD
parent
57fc5d28
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_netcup.sh
View file @
50d5c4b9
...
@@ -117,7 +117,7 @@ dns_netcup_rm() {
...
@@ -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\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
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment