mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 13:11:41 +00:00
Fix CI issues
This commit is contained in:
parent
657334fb67
commit
a8202d4b37
@ -35,10 +35,8 @@ dns_inwx_add() {
|
||||
fi
|
||||
_debug _sub_domain "$_sub_domain"
|
||||
_debug _domain "$_domain"
|
||||
|
||||
_debug "Getting txt records"
|
||||
|
||||
|
||||
printf -v xml_content '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<methodCall>
|
||||
<methodName>nameserver.info</methodName>
|
||||
@ -68,7 +66,7 @@ dns_inwx_add() {
|
||||
</value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>' $_domain $_sub_domain
|
||||
</methodCall>' "$_domain" "$_sub_domain"
|
||||
response="$(_post "$xml_content" "$INWX_Api" "" "POST")"
|
||||
|
||||
if ! printf "%s" "$response" | grep "Command completed successfully" >/dev/null; then
|
||||
@ -78,11 +76,11 @@ dns_inwx_add() {
|
||||
|
||||
if ! printf "%s" "$response" | grep "count" -q; then
|
||||
_info "Adding record"
|
||||
_inwx_add_record $_domain $_sub_domain $txtvalue
|
||||
_inwx_add_record "$_domain" "$_sub_domain" "$txtvalue"
|
||||
else
|
||||
_record_id=$(printf '%s' $response | sed -nE 's/.*(<member><name>record){1}(.*)(<name>id<\/name><value><int>)([0-9]+){1}.*/\4/p')
|
||||
_record_id=$(printf '%s' "$response" | sed -nE 's/.*(<member><name>record){1}(.*)(<name>id<\/name><value><int>)([0-9]+){1}.*/\4/p')
|
||||
_info "Updating record"
|
||||
_inwx_update_record $_record_id $txtvalue
|
||||
_inwx_update_record "$_record_id" "$txtvalue"
|
||||
fi
|
||||
|
||||
}
|
||||
@ -117,7 +115,6 @@ dns_inwx_rm() {
|
||||
|
||||
_debug "Getting txt records"
|
||||
|
||||
|
||||
printf -v xml_content '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<methodCall>
|
||||
<methodName>nameserver.info</methodName>
|
||||
@ -147,7 +144,7 @@ dns_inwx_rm() {
|
||||
</value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>' $_domain $_sub_domain
|
||||
</methodCall>' "$_domain" "$_sub_domain"
|
||||
response="$(_post "$xml_content" "$INWX_Api" "" "POST")"
|
||||
|
||||
if ! printf "%s" "$response" | grep "Command completed successfully" >/dev/null; then
|
||||
@ -158,12 +155,11 @@ dns_inwx_rm() {
|
||||
if ! printf "%s" "$response" | grep "count" -q; then
|
||||
_info "Do not need to delete record"
|
||||
else
|
||||
_record_id=$(printf '%s' $response | sed -nE 's/.*(<member><name>record){1}(.*)(<name>id<\/name><value><int>)([0-9]+){1}.*/\4/p')
|
||||
_record_id=$(printf '%s' "$response" | sed -nE 's/.*(<member><name>record){1}(.*)(<name>id<\/name><value><int>)([0-9]+){1}.*/\4/p')
|
||||
_info "Deleting record"
|
||||
_inwx_delete_record $_record_id
|
||||
_inwx_delete_record "$_record_id"
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
#################### Private functions below ##################################
|
||||
@ -209,8 +205,8 @@ _get_root() {
|
||||
i=2
|
||||
p=1
|
||||
|
||||
|
||||
export _H1=$(_inwx_login)
|
||||
_H1=$(_inwx_login)
|
||||
export _H1
|
||||
printf -v xml_content '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<methodCall>
|
||||
<methodName>nameserver.list</methodName>
|
||||
@ -256,7 +252,7 @@ _inwx_delete_record() {
|
||||
</value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>' $record_id
|
||||
</methodCall>' "$record_id"
|
||||
|
||||
response="$(_post "$xml_content" "$INWX_Api" "" "POST")"
|
||||
|
||||
@ -266,7 +262,6 @@ _inwx_delete_record() {
|
||||
fi
|
||||
return 0
|
||||
|
||||
|
||||
}
|
||||
|
||||
_inwx_update_record() {
|
||||
@ -295,8 +290,7 @@ _inwx_update_record() {
|
||||
</value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>' $txtval $record_id
|
||||
|
||||
</methodCall>' "$txtval" "$record_id"
|
||||
|
||||
response="$(_post "$xml_content" "$INWX_Api" "" "POST")"
|
||||
|
||||
@ -314,10 +308,6 @@ _inwx_add_record() {
|
||||
sub_domain=$2
|
||||
txtval=$3
|
||||
|
||||
_debug domain: $domain
|
||||
_debug value: $txtval
|
||||
_debug subd: $sub_domain
|
||||
|
||||
printf -v xml_content '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<methodCall>
|
||||
<methodName>nameserver.createRecord</methodName>
|
||||
@ -353,7 +343,7 @@ _inwx_add_record() {
|
||||
</value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>' $domain $txtval $sub_domain
|
||||
</methodCall>' "$domain" "$txtval" "$sub_domain"
|
||||
|
||||
response="$(_post "$xml_content" "$INWX_Api" "" "POST")"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user