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
584fb290
Commit
584fb290
authored
Feb 06, 2018
by
neilpang
Browse files
fix
https://github.com/Neilpang/acme.sh/issues/1191
https://github.com/Neilpang/acme.sh/issues/1246
parent
71013b37
Changes
2
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
584fb290
...
...
@@ -3594,7 +3594,7 @@ $_authorizations_map"
entry
=
"
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
'[^\{]*"type":"'
$vtype
'"[^\}]*'
)
"
_debug entry
"
$entry
"
if
[
-z
"
$entry
"
]
;
then
_err
"Error, can not get domain token
$d
"
_err
"Error, can not get domain token
entry
$d
"
_clearup
_on_issue_err
"
$_post_hook
"
return
1
...
...
@@ -3602,6 +3602,12 @@ $_authorizations_map"
token
=
"
$(
printf
"%s
\n
"
"
$entry
"
| _egrep_o
'"token":"[^"]*'
|
cut
-d
:
-f
2 |
tr
-d
'"'
)
"
_debug token
"
$token
"
if
[
-z
"
$token
"
]
;
then
_err
"Error, can not get domain token
$entry
"
_clearup
_on_issue_err
"
$_post_hook
"
return
1
fi
if
[
"
$ACME_VERSION
"
=
"2"
]
;
then
uri
=
"
$(
printf
"%s
\n
"
"
$entry
"
| _egrep_o
'"url":"[^"]*'
|
cut
-d
'"'
-f
4 | _head_n 1
)
"
else
...
...
@@ -3609,6 +3615,12 @@ $_authorizations_map"
fi
_debug uri
"
$uri
"
if
[
-z
"
$uri
"
]
;
then
_err
"Error, can not get domain uri.
$entry
"
_clearup
_on_issue_err
"
$_post_hook
"
return
1
fi
keyauthorization
=
"
$token
.
$thumbprint
"
_debug keyauthorization
"
$keyauthorization
"
...
...
dnsapi/dns_inwx.sh
View file @
584fb290
...
...
@@ -35,53 +35,9 @@ dns_inwx_add() {
fi
_debug _sub_domain
"
$_sub_domain
"
_debug _domain
"
$_domain
"
_debug
"Getting txt records"
xml_content
=
$(
printf
'<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>nameserver.info</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>domain</name>
<value>
<string>%s</string>
</value>
</member>
<member>
<name>type</name>
<value>
<string>TXT</string>
</value>
</member>
<member>
<name>name</name>
<value>
<string>%s</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>'
"
$_domain
"
"
$_sub_domain
"
)
response
=
"
$(
_post
"
$xml_content
"
"
$INWX_Api
"
""
"POST"
)
"
if
!
printf
"%s"
"
$response
"
|
grep
"Command completed successfully"
>
/dev/null
;
then
_err
"Error could net get txt records"
return
1
fi
if
!
printf
"%s"
"
$response
"
|
grep
"count"
>
/dev/null
;
then
_info
"Adding record"
_inwx_add_record
"
$_domain
"
"
$_sub_domain
"
"
$txtvalue
"
else
_record_id
=
$(
printf
'%s'
"
$response
"
| _egrep_o
'.*(<member><name>record){1}(.*)([0-9]+){1}'
| _egrep_o
'<name>id<\/name><value><int>[0-9]+'
| _egrep_o
'[0-9]+'
)
_info
"Updating record"
_inwx_update_record
"
$_record_id
"
"
$txtvalue
"
fi
_info
"Adding record"
_inwx_add_record
"
$_domain
"
"
$_sub_domain
"
"
$txtvalue
"
}
...
...
@@ -147,7 +103,7 @@ dns_inwx_rm() {
</methodCall>'
"
$_domain
"
"
$_sub_domain
"
)
response
=
"
$(
_post
"
$xml_content
"
"
$INWX_Api
"
""
"POST"
)
"
if
!
printf
"%s"
"
$response
"
|
grep
"Command completed successfully"
>
/dev/null
;
then
if
!
_contains
"
$response
"
"Command completed successfully"
;
then
_err
"Error could not get txt records"
return
1
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