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
d2481f57
Unverified
Commit
d2481f57
authored
Mar 18, 2024
by
neil
Committed by
GitHub
Mar 18, 2024
Browse files
Merge pull request #5048 from hknet/patch-1
dns-record TTL set to 300
parents
49f6104f
0bf87bf4
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_kappernet.sh
View file @
d2481f57
...
...
@@ -41,7 +41,7 @@ dns_kappernet_add() {
_debug _domain
"DOMAIN:
$_domain
"
_info
"Trying to add TXT DNS Record"
data
=
"%7B%22name%22%3A%22
$fullhostname
%22%2C%22type%22%3A%22TXT%22%2C%22content%22%3A%22
$txtvalue
%22%2C%22ttl%22%3A%223
6
00%22%2C%22prio%22%3A%22%22%7D"
data
=
"%7B%22name%22%3A%22
$fullhostname
%22%2C%22type%22%3A%22TXT%22%2C%22content%22%3A%22
$txtvalue
%22%2C%22ttl%22%3A%22300%22%2C%22prio%22%3A%22%22%7D"
if
_kappernet_api GET
"action=new&subject=
$_domain
&data=
$data
"
;
then
if
_contains
"
$response
"
"{
\"
OK
\"
:true"
;
then
...
...
@@ -81,7 +81,7 @@ dns_kappernet_rm() {
_saveaccountconf_mutable KAPPERNETDNS_Secret
"
$KAPPERNETDNS_Secret
"
_info
"Trying to remove the TXT Record:
$fullhostname
containing
$txtvalue
"
data
=
"%7B%22name%22%3A%22
$fullhostname
%22%2C%22type%22%3A%22TXT%22%2C%22content%22%3A%22
$txtvalue
%22%2C%22ttl%22%3A%223
6
00%22%2C%22prio%22%3A%22%22%7D"
data
=
"%7B%22name%22%3A%22
$fullhostname
%22%2C%22type%22%3A%22TXT%22%2C%22content%22%3A%22
$txtvalue
%22%2C%22ttl%22%3A%22300%22%2C%22prio%22%3A%22%22%7D"
if
_kappernet_api GET
"action=del&subject=
$fullhostname
&data=
$data
"
;
then
if
_contains
"
$response
"
"{
\"
OK
\"
:true"
;
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