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
bfccf29c
Commit
bfccf29c
authored
Nov 29, 2020
by
Lorenz Stechauner
Browse files
World4You redirect fix
parent
1e3bb1f0
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_world4you.sh
View file @
bfccf29c
...
...
@@ -45,8 +45,8 @@ dns_world4you_add() {
return
3
fi
_ORIG_ACME_CURL
=
"
$_ACME_CURL
"
_
ACME_CURL
=
$(
echo
"
$_ACME_CURL
"
|
sed
's/ -L / /'
)
ACME_HTTP_NO_REDIRECTS
=
1
_
resethttp
body
=
"AddDnsRecordForm[name]=
$record
&AddDnsRecordForm[dnsType][type]=TXT&
\
AddDnsRecordForm[value]=
$value
&AddDnsRecordForm[aktivPaket]=
$paketnr
&AddDnsRecordForm[uniqueFormIdDP]=
$formiddp
&
\
...
...
@@ -54,7 +54,8 @@ AddDnsRecordForm[uniqueFormIdTTL]=$formidttl&AddDnsRecordForm[_token]=$form_toke
_info
"Adding record..."
ret
=
$(
_post
"
$body
"
"
$WORLD4YOU_API
/
$paketnr
/dns"
''
POST
'application/x-www-form-urlencoded'
)
_ACME_CURL
=
"
$_ORIG_ACME_CURL
"
unset
ACME_HTTP_NO_REDIRECTS
_resethttp
if
grep
'302'
>
/dev/null <
"
$HTTP_HEADER
"
;
then
return
0
...
...
@@ -104,8 +105,8 @@ dns_world4you_rm() {
recordid
=
$(
printf
"TXT:%s.:
\"
%s
\"
"
"
$fqdn
"
"
$value
"
| _base64
)
_debug recordid
"
$recordid
"
_ORIG_ACME_CURL
=
"
$_ACME_CURL
"
_
ACME_CURL
=
$(
echo
"
$_ACME_CURL
"
|
sed
's/ -L / /'
)
ACME_HTTP_NO_REDIRECTS
=
1
_
resethttp
body
=
"DeleteDnsRecordForm[recordId]=
$recordid
&DeleteDnsRecordForm[aktivPaket]=
$paketnr
&
\
DeleteDnsRecordForm[uniqueFormIdDP]=
$formiddp
&DeleteDnsRecordForm[uniqueFormIdTTL]=
$formidttl
&
\
...
...
@@ -113,7 +114,8 @@ DeleteDnsRecordForm[_token]=$form_token"
_info
"Removing record..."
ret
=
$(
_post
"
$body
"
"
$WORLD4YOU_API
/
$paketnr
/deleteRecord"
''
POST
'application/x-www-form-urlencoded'
)
_ACME_CURL
=
"
$_ORIG_ACME_CURL
"
unset
ACME_HTTP_NO_REDIRECTS
_resethttp
if
grep
'302'
>
/dev/null <
"
$HTTP_HEADER
"
;
then
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