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
80e13bc2
Commit
80e13bc2
authored
Feb 17, 2022
by
Marvo2011
Browse files
Merge remote-tracking branch 'origin/dev' into dev
parents
73692986
62dad721
Changes
2
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_ispconfig.sh
View file @
80e13bc2
...
...
@@ -32,7 +32,7 @@ dns_ispconfig_rm() {
#################### Private functions below ##################################
_ISPC_credentials
()
{
if
[
-z
"
${
ISPC_User
}
"
]
||
[
-z
"
$ISPC_Password
"
]
||
[
-z
"
${
ISPC_Api
}
"
]
||
[
-
z
"
${
ISPC_Api_Insecure
}
"
]
;
then
if
[
-z
"
${
ISPC_User
}
"
]
||
[
-z
"
$ISPC_Password
"
]
||
[
-z
"
${
ISPC_Api
}
"
]
||
[
-
n
"
${
ISPC_Api_Insecure
}
"
]
;
then
ISPC_User
=
""
ISPC_Password
=
""
ISPC_Api
=
""
...
...
dnsapi/dns_selfhost.sh
0 → 100644
View file @
80e13bc2
#!/usr/bin/env sh
#
# Author: Marvin Edeler
# Report Bugs here: https://github.com/Marvo2011/acme.sh/issues/1
# Last Edit: 09.01.2022
dns_selfhost_add
()
{
domain
=
$1
txt
=
$2
_info
"Calling acme-dns on selfhost"
_debug fulldomain
"
$domain
"
_debug txtvalue
"
$txt
"
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_RID
=
"
${
SELFHOSTDNS_RID
:-
$(
_readaccountconf_mutable SELFHOSTDNS_RID
)
}
"
SELFHOSTDNS_RID2
=
"
${
SELFHOSTDNS_RID2
:-
$(
_readaccountconf_mutable SELFHOSTDNS_RID2
)
}
"
SELFHOSTDNS_LAST_SLOT
=
"
$(
_readaccountconf_mutable SELFHOSTDNS_LAST_SLOT
)
"
if
test
-z
"
$SELFHOSTDNS_LAST_SLOT
"
;
then
SELFHOSTDNS_LAST_SLOT
=
1
fi
_saveaccountconf_mutable SELFHOSTDNS_USERNAME
"
$SELFHOSTDNS_USERNAME
"
_saveaccountconf_mutable SELFHOSTDNS_PASSWORD
"
$SELFHOSTDNS_PASSWORD
"
_saveaccountconf_mutable SELFHOSTDNS_RID
"
$SELFHOSTDNS_RID
"
_saveaccountconf_mutable SELFHOSTDNS_RID2
"
$SELFHOSTDNS_RID2
"
if
[
$SELFHOSTDNS_LAST_SLOT
=
"2"
]
;
then
rid
=
$SELFHOSTDNS_RID
SELFHOSTDNS_LAST_SLOT
=
1
else
rid
=
$SELFHOSTDNS_RID2
SELFHOSTDNS_LAST_SLOT
=
2
fi
_saveaccountconf_mutable SELFHOSTDNS_LAST_SLOT
"
$SELFHOSTDNS_LAST_SLOT
"
_info
"Trying to add
$txt
on selfhost for rid:
$rid
"
data
=
"?username=
$SELFHOSTDNS_USERNAME
&password=
$SELFHOSTDNS_PASSWORD
&rid=
$rid
&content=
$txt
"
response
=
"
$(
_get
"
$SELFHOSTDNS_UPDATE_URL$data
"
)
"
if
!
echo
"
$response
"
|
grep
"200 OK"
>
/dev/null
;
then
_err
"Invalid response of acme-dns for selfhost"
return
1
fi
}
dns_acmedns_rm
()
{
domain
=
$1
txt
=
$2
_debug fulldomain
"
$domain
"
_debug txtvalue
"
$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