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
a10c0b51
Unverified
Commit
a10c0b51
authored
Feb 26, 2021
by
neil
Committed by
GitHub
Feb 26, 2021
Browse files
Merge pull request #3426 from jakelamotta/master
Fix issue with subdomain certificates in dns_simply
parents
9a90fe37
1917c4b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_simply.sh
View file @
a10c0b51
...
@@ -6,9 +6,11 @@
...
@@ -6,9 +6,11 @@
#SIMPLY_ApiKey="apikey"
#SIMPLY_ApiKey="apikey"
#
#
#SIMPLY_Api="https://api.simply.com/1/[ACCOUNTNAME]/[APIKEY]"
#SIMPLY_Api="https://api.simply.com/1/[ACCOUNTNAME]/[APIKEY]"
SIMPLY_Api_Default
=
"https://api.simply.com/1"
SIMPLY_Api_Default
=
"https://api.simply.com/1"
#This is used for determining success of REST call
SIMPLY_SUCCESS_CODE
=
'"status": 200'
######## Public functions #####################
######## Public functions #####################
#Usage: add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
#Usage: add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
dns_simply_add
()
{
dns_simply_add
()
{
...
@@ -171,7 +173,7 @@ _get_root() {
...
@@ -171,7 +173,7 @@ _get_root() {
return
1
return
1
fi
fi
if
_contains
"
$response
"
'"code":"NOT_FOUND"'
;
then
if
!
_contains
"
$response
"
"
$SIMPLY_SUCCESS_CODE
"
;
then
_debug
"
$h
not found"
_debug
"
$h
not found"
else
else
_sub_domain
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
1-
$p
)
_sub_domain
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
1-
$p
)
...
@@ -196,6 +198,12 @@ _simply_add_record() {
...
@@ -196,6 +198,12 @@ _simply_add_record() {
return
1
return
1
fi
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
return
0
}
}
...
@@ -211,6 +219,12 @@ _simply_delete_record() {
...
@@ -211,6 +219,12 @@ _simply_delete_record() {
return
1
return
1
fi
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
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