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
c5100219
Commit
c5100219
authored
Feb 24, 2021
by
Kristian Johansson
Browse files
Fixes response handling and thereby allow issuing of subdomain certs
parent
c33e5bc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_simply.sh
View file @
c5100219
...
...
@@ -6,7 +6,7 @@
#SIMPLY_ApiKey="apikey"
#
#SIMPLY_Api="https://api.simply.com/1/[ACCOUNTNAME]/[APIKEY]"
SIMPLY_SUCCESS_CODE
=
'"status": 200'
SIMPLY_Api_Default
=
"https://api.simply.com/1"
######## Public functions #####################
...
...
@@ -171,7 +171,7 @@ _get_root() {
return
1
fi
if
_contains
"
$response
"
'"code":"NOT_FOUND"'
;
then
if
!
_contains
"
$response
"
"
$SIMPLY_SUCCESS_CODE
"
;
then
_debug
"
$h
not found"
else
_sub_domain
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
1-
$p
)
...
...
@@ -196,6 +196,12 @@ _simply_add_record() {
return
1
fi
if
!
_contains
"
$response
"
"
$SIMPLY_SUCCESS_CODE
"
;
then
_err
"Call to API not sucessfull, see below message for more details"
_err
"
$response
"
return
1
fi
return
0
}
...
...
@@ -211,6 +217,12 @@ _simply_delete_record() {
return
1
fi
if
!
_contains
"
$response
"
"
$SIMPLY_SUCCESS_CODE
"
;
then
_err
"Call to API not sucessfull, see below message for more details"
_err
"
$response
"
return
1
fi
return
0
}
...
...
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