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
c94f9f21
Commit
c94f9f21
authored
Aug 23, 2022
by
AlvinSchiller
Browse files
fixed shfmt
parent
fc336e37
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_selfhost.sh
View file @
c94f9f21
...
...
@@ -18,7 +18,7 @@ dns_selfhost_add() {
SELFHOSTDNS_PASSWORD
=
"
${
SELFHOSTDNS_PASSWORD
:-
$(
_readaccountconf_mutable SELFHOSTDNS_PASSWORD
)
}
"
# These values are domain dependent, so read them from there
SELFHOSTDNS_MAP
=
"
${
SELFHOSTDNS_MAP
:-
$(
_readdomainconf SELFHOSTDNS_MAP
)
}
"
# Selfhost api can't dynamically add TXT record,
# Selfhost api can't dynamically add TXT record,
# so we have to store the last used RID of the domain to support a second RID for wildcard domains
# (format: ';fulldomainA:lastRid;;fulldomainB:lastRid;...')
SELFHOSTDNS_MAP_LAST_USED_INTERNAL
=
$(
_readdomainconf SELFHOSTDNS_MAP_LAST_USED_INTERNAL
)
...
...
@@ -56,12 +56,11 @@ dns_selfhost_add() {
if
!
test
-z
"
$lastUsedRidForDomainEntry
"
;
then
# replace last used rid entry for domain
SELFHOSTDNS_MAP_LAST_USED_INTERNAL
=
$(
echo
"
$SELFHOSTDNS_MAP_LAST_USED_INTERNAL
"
|
sed
-n
-E
"s/
$lastUsedRidForDomainEntry
/;
$fulldomain
:
$rid
;/p"
)
else
else
# add last used rid entry for domain
SELFHOSTDNS_MAP_LAST_USED_INTERNAL
=
"
$SELFHOSTDNS_MAP_LAST_USED_INTERNAL
"";
$fulldomain
:
$rid
;"
fi
_info
"Trying to add
$txt
on selfhost for rid:
$rid
"
data
=
"?username=
$SELFHOSTDNS_USERNAME
&password=
$SELFHOSTDNS_PASSWORD
&rid=
$rid
&content=
$txt
"
...
...
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