mirror of
https://github.com/linuxserver/docker-swag.git
synced 2025-01-22 20:51:11 -05:00
Account for dashes and renewal authenticator
This commit is contained in:
parent
7b9c67838f
commit
82b3b747a1
@ -59,38 +59,46 @@ else
|
||||
fi
|
||||
|
||||
# update plugin names in dns conf inis
|
||||
sed -i 's|^certbot_dns_aliyun:||g' /config/dns-conf/aliyun.ini
|
||||
sed -i 's|^certbot_dns_cpanel:||g' /config/dns-conf/cpanel.ini
|
||||
sed -i 's|^dns_cpanel_|cpanel_|g' /config/dns-conf/cpanel.ini
|
||||
sed -i 's|^directadmin_|dns_directadmin_|g' /config/dns-conf/directadmin.ini
|
||||
sed -i 's|^certbot_dns_domeneshop:||g' /config/dns-conf/domeneshop.ini
|
||||
sed -i 's|^certbot_plugin_gandi:dns_|dns_gandi_|g' /config/dns-conf/gandi.ini
|
||||
sed -i 's|^certbot_dns_inwx:||g' /config/dns-conf/inwx.ini
|
||||
sed -i 's|^certbot_dns_transip:||g' /config/dns-conf/transip.ini
|
||||
sed -i 's|^certbot[-_]dns[-_]aliyun:||g' /config/dns-conf/aliyun.ini
|
||||
sed -i 's|^certbot[-_]dns[-_]cpanel:||g' /config/dns-conf/cpanel.ini
|
||||
sed -i 's|^dns[-_]cpanel[-_]|cpanel_|g' /config/dns-conf/cpanel.ini
|
||||
sed -i 's|^directadmin[-_]|dns_directadmin_|g' /config/dns-conf/directadmin.ini
|
||||
sed -i 's|^certbot[-_]dns[-_]domeneshop:||g' /config/dns-conf/domeneshop.ini
|
||||
sed -i 's|^certbot[-_]plugin[-_]gandi:dns[-_]|dns_gandi_|g' /config/dns-conf/gandi.ini
|
||||
sed -i 's|^certbot[-_]dns[-_]inwx:||g' /config/dns-conf/inwx.ini
|
||||
sed -i 's|^certbot[-_]dns[-_]transip:||g' /config/dns-conf/transip.ini
|
||||
|
||||
# update plugin names in renewal conf
|
||||
if [[ -f "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf" ]] && [[ "${ORIGVALIDATION}" = "dns" ]]; then
|
||||
if [[ "${ORIGDNSPLUGIN}" =~ ^(aliyun)$ ]]; then
|
||||
sed -i 's|^certbot_dns_aliyun:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^authenticator = certbot[-_]dns[-_]aliyun:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^certbot[-_]dns[-_]aliyun:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
fi
|
||||
if [[ "${ORIGDNSPLUGIN}" =~ ^(cpanel)$ ]]; then
|
||||
sed -i 's|^certbot_dns_cpanel:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^dns_cpanel_|cpanel_|g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^authenticator = certbot[-_]dns[-_]cpanel:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^certbot[-_]dns[-_]cpanel:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^authenticator = dns[-_]cpanel|authenticator = cpanel|g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^dns[-_]cpanel[-_]|cpanel_|g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
fi
|
||||
if [[ "${ORIGDNSPLUGIN}" =~ ^(directadmin)$ ]]; then
|
||||
sed -i 's|^directadmin_|dns_directadmin_|g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^authenticator = directadmin|authenticator = dns-directadmin|g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^directadmin[-_]|dns_directadmin_|g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
fi
|
||||
if [[ "${ORIGDNSPLUGIN}" =~ ^(domeneshop)$ ]]; then
|
||||
sed -i 's|^certbot_dns_domeneshop:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^authenticator = certbot[-_]dns[-_]domeneshop:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^certbot[-_]dns[-_]domeneshop:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
fi
|
||||
if [[ "${ORIGDNSPLUGIN}" =~ ^(gandi)$ ]]; then
|
||||
sed -i 's|^certbot_plugin_gandi:dns_|dns_gandi_|g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^authenticator = certbot[-_]plugin[-_]gandi:dns|authenticator = dns-gandi|g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^certbot[-_]plugin[-_]gandi:dns[-_]|dns_gandi_|g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
fi
|
||||
if [[ "${ORIGDNSPLUGIN}" =~ ^(inwx)$ ]]; then
|
||||
sed -i 's|^certbot_dns_inwx:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^authenticator = certbot[-_]dns[-_]inwx:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^certbot[-_]dns[-_]inwx:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
fi
|
||||
if [[ "${ORIGDNSPLUGIN}" =~ ^(transip)$ ]]; then
|
||||
sed -i 's|^certbot_dns_transip:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^authenticator = certbot[-_]dns[-_]transip:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
sed -i 's|^certbot[-_]dns[-_]transip:||g' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user