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
2982e994
Commit
2982e994
authored
Feb 17, 2022
by
Marvo2011
Browse files
Add custom option to map multidomain RIDs
parent
80e13bc2
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_selfhost.sh
View file @
2982e994
...
...
@@ -2,7 +2,7 @@
#
# Author: Marvin Edeler
# Report Bugs here: https://github.com/Marvo2011/acme.sh/issues/1
# Last Edit:
09
.0
1
.2022
# Last Edit:
17
.0
2
.2022
dns_selfhost_add
()
{
domain
=
$1
...
...
@@ -14,6 +14,7 @@ dns_selfhost_add() {
SELFHOSTDNS_UPDATE_URL
=
"https://selfhost.de/cgi-bin/api.pl"
SELFHOSTDNS_USERNAME
=
"
${
SELFHOSTDNS_USERNAME
:-
$(
_readaccountconf_mutable SELFHOSTDNS_USERNAME
)
}
"
SELFHOSTDNS_PASSWORD
=
"
${
SELFHOSTDNS_PASSWORD
:-
$(
_readaccountconf_mutable SELFHOSTDNS_PASSWORD
)
}
"
SELFHOSTDNS_MAP
=
"
${
SELFHOSTDNS_MAP
:-
$(
_readaccountconf_mutable SELFHOSTDNS_MAP
)
}
"
SELFHOSTDNS_RID
=
"
${
SELFHOSTDNS_RID
:-
$(
_readaccountconf_mutable SELFHOSTDNS_RID
)
}
"
SELFHOSTDNS_RID2
=
"
${
SELFHOSTDNS_RID2
:-
$(
_readaccountconf_mutable SELFHOSTDNS_RID2
)
}
"
SELFHOSTDNS_LAST_SLOT
=
"
$(
_readaccountconf_mutable SELFHOSTDNS_LAST_SLOT
)
"
...
...
@@ -24,9 +25,12 @@ dns_selfhost_add() {
_saveaccountconf_mutable SELFHOSTDNS_USERNAME
"
$SELFHOSTDNS_USERNAME
"
_saveaccountconf_mutable SELFHOSTDNS_PASSWORD
"
$SELFHOSTDNS_PASSWORD
"
_saveaccountconf_mutable SELFHOSTDNS_MAP
"
$SELFHOSTDNS_MAP
"
_saveaccountconf_mutable SELFHOSTDNS_RID
"
$SELFHOSTDNS_RID
"
_saveaccountconf_mutable SELFHOSTDNS_RID2
"
$SELFHOSTDNS_RID2
"
rid
=
$(
echo
$SELFHOSTDNS_MAP
|
grep
-Eoi
"
$domain
:(
\d
+)"
|
tr
-d
"
$domain
:"
)
if
test
-z
"
$rid
"
;
then
if
[
$SELFHOSTDNS_LAST_SLOT
=
"2"
]
;
then
rid
=
$SELFHOSTDNS_RID
SELFHOSTDNS_LAST_SLOT
=
1
...
...
@@ -34,6 +38,7 @@ dns_selfhost_add() {
rid
=
$SELFHOSTDNS_RID2
SELFHOSTDNS_LAST_SLOT
=
2
fi
fi
_saveaccountconf_mutable SELFHOSTDNS_LAST_SLOT
"
$SELFHOSTDNS_LAST_SLOT
"
...
...
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