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
aa9975ad
Commit
aa9975ad
authored
Mar 20, 2018
by
Felipe Braz
Browse files
dns_kinghost.sh :: changed printf to echo
parent
6787c81a
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_kinghost.sh
View file @
aa9975ad
...
...
@@ -39,14 +39,14 @@ dns_kinghost_add() {
#This API call returns "status":"ok" if dns record does not exists
#We are creating a new txt record here, so we expect the "ok" status
if
!
printf
"%s"
"
$response
"
|
grep
'"status":"ok"'
>
/dev/null
;
then
if
!
echo
"
$response
"
|
grep
'"status":"ok"'
>
/dev/null
;
then
_err
"Error"
_err
"
$response
"
return
1
fi
_kinghost_rest POST
"dns"
"name=
$fulldomain
&content=
$txtvalue
"
if
!
printf
"%s"
"
$response
"
|
grep
'"status":"ok"'
>
/dev/null
;
then
if
!
echo
"
$response
"
|
grep
'"status":"ok"'
>
/dev/null
;
then
_err
"Error"
_err
"
$response
"
return
1
...
...
@@ -76,14 +76,14 @@ dns_kinghost_rm() {
#This API call returns "status":"ok" if dns record does not exists
#We are removing a txt record here, so the record must exists
if
printf
"%s"
"
$response
"
|
grep
'"status":"ok"'
>
/dev/null
;
then
if
echo
"
$response
"
|
grep
'"status":"ok"'
>
/dev/null
;
then
_err
"Error"
_err
"
$response
"
return
1
fi
_kinghost_rest DELETE
"dns"
"name=
$fulldomain
&content=
$txtvalue
"
if
!
printf
"%s"
"
$response
"
|
grep
'"status":"ok"'
>
/dev/null
;
then
if
!
echo
"
$response
"
|
grep
'"status":"ok"'
>
/dev/null
;
then
_err
"Error"
_err
"
$response
"
return
1
...
...
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