mirror of
https://github.com/linuxserver/docker-swag.git
synced 2026-03-24 06:59:05 +09:00
add support for directadmin dns validation
This commit is contained in:
21
root/defaults/dns-conf/directadmin.ini
Normal file
21
root/defaults/dns-conf/directadmin.ini
Normal file
@@ -0,0 +1,21 @@
|
||||
# Instructions: https://github.com/cybercinch/certbot-dns-directadmin/blob/master/certbot_dns_directadmin/__init__.py
|
||||
|
||||
# It is recommended to create a login key in the DirectAdmin control panel to be used as value for directadmin_password.
|
||||
# Instructions on how to create such key can be found at https://help.directadmin.com/item.php?id=523.
|
||||
#
|
||||
# Make sure to grant the following permissions:
|
||||
# - CMD_API_LOGIN_TEST
|
||||
# - CMD_API_DNS_CONTROL
|
||||
# - CMD_API_SHOW_DOMAINS
|
||||
#
|
||||
# Username and password can also be used in case your DirectAdmin instance has no support for login keys.
|
||||
|
||||
# The DirectAdmin Server url
|
||||
# include the scheme and the port number (Normally 2222)
|
||||
directadmin_url = https://my.directadminserver.com:2222
|
||||
|
||||
# The DirectAdmin username
|
||||
directadmin_username = username
|
||||
|
||||
# The DirectAdmin password
|
||||
directadmin_password = aSuperStrongPassword
|
||||
@@ -99,7 +99,7 @@ if ! grep -q 'PARAMETERS' "/config/nginx/dhparams.pem"; then
|
||||
fi
|
||||
|
||||
# check to make sure DNSPLUGIN is selected if dns validation is used
|
||||
[[ "$VALIDATION" = "dns" ]] && [[ ! "$DNSPLUGIN" =~ ^(aliyun|cloudflare|cloudxns|cpanel|digitalocean|dnsimple|dnsmadeeasy|domeneshop|gandi|gehirn|google|hetzner|inwx|linode|luadns|netcup|njalla|nsone|ovh|rfc2136|route53|sakuracloud|transip)$ ]] && \
|
||||
[[ "$VALIDATION" = "dns" ]] && [[ ! "$DNSPLUGIN" =~ ^(aliyun|cloudflare|cloudxns|cpanel|digitalocean|directadmin|dnsimple|dnsmadeeasy|domeneshop|gandi|gehirn|google|hetzner|inwx|linode|luadns|netcup|njalla|nsone|ovh|rfc2136|route53|sakuracloud|transip)$ ]] && \
|
||||
echo "Please set the DNSPLUGIN variable to a valid plugin name. See docker info for more details." && \
|
||||
sleep infinity
|
||||
|
||||
@@ -216,6 +216,9 @@ if [ "$VALIDATION" = "dns" ]; then
|
||||
elif [[ "$DNSPLUGIN" =~ ^(aliyun|domeneshop|hetzner|inwx|netcup|njalla|transip)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="-a dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
|
||||
elif [[ "$DNSPLUGIN" =~ ^(directadmin)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="-a ${DNSPLUGIN} --${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
|
||||
else
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="--dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
|
||||
|
||||
Reference in New Issue
Block a user