Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
046094bd
Unverified
Commit
046094bd
authored
Sep 07, 2021
by
neil
Committed by
GitHub
Sep 07, 2021
Browse files
Merge pull request #3696 from TheTyrius/dev
[dns_netcup] Fix variable name
parents
b335840f
1064c270
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_netcup.sh
View file @
046094bd
...
@@ -119,16 +119,16 @@ login() {
...
@@ -119,16 +119,16 @@ 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
"
if
[
"
$(
_getfield
"
$
msg
"
"4"
|
sed
s/
\"
status
\"
:
\"
//g |
sed
s/
\"
//g
)
"
!=
"success"
]
;
then
if
[
"
$(
_getfield
"
$
tmp
"
"4"
|
sed
s/
\"
status
\"
:
\"
//g |
sed
s/
\"
//g
)
"
!=
"success"
]
;
then
_err
"
$
msg
"
_err
"
$
tmp
"
return
1
return
1
fi
fi
}
}
logout
()
{
logout
()
{
tmp
=
$(
_post
"{
\"
action
\"
:
\"
logout
\"
,
\"
param
\"
: {
\"
apikey
\"
:
\"
$NC_Apikey
\"
,
\"
apisessionid
\"
:
\"
$sid
\"
,
\"
customernumber
\"
:
\"
$NC_CID
\"
}}"
"
$end
"
""
"POST"
)
tmp
=
$(
_post
"{
\"
action
\"
:
\"
logout
\"
,
\"
param
\"
: {
\"
apikey
\"
:
\"
$NC_Apikey
\"
,
\"
apisessionid
\"
:
\"
$sid
\"
,
\"
customernumber
\"
:
\"
$NC_CID
\"
}}"
"
$end
"
""
"POST"
)
_debug
"
$tmp
"
_debug
"
$tmp
"
if
[
"
$(
_getfield
"
$
msg
"
"4"
|
sed
s/
\"
status
\"
:
\"
//g |
sed
s/
\"
//g
)
"
!=
"success"
]
;
then
if
[
"
$(
_getfield
"
$
tmp
"
"4"
|
sed
s/
\"
status
\"
:
\"
//g |
sed
s/
\"
//g
)
"
!=
"success"
]
;
then
_err
"
$
msg
"
_err
"
$
tmp
"
return
1
return
1
fi
fi
}
}
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