diff --git a/le-dns/dnspod.conf b/le-dns/dnspod.conf index c362753..8b0e9dc 100644 --- a/le-dns/dnspod.conf +++ b/le-dns/dnspod.conf @@ -1,4 +1,5 @@ TOKEN="YOUR_API_TOKEN" RECORD_LINE="默认" DOMAIN="example.com" -CERT_DOMAINS="example.com www.example.com im.example.com" \ No newline at end of file +CERT_DOMAINS="example.com www.example.com im.example.com" +#ECC=TRUE diff --git a/le-dns/le-dnspod.sh b/le-dns/le-dnspod.sh index a044e98..7ef5c51 100755 --- a/le-dns/le-dnspod.sh +++ b/le-dns/le-dnspod.sh @@ -4,7 +4,8 @@ export CONFIG=$1 if [ -f "$CONFIG" ];then . "$CONFIG" - cd "$(dirname $CONFIG)" || exit 1 + DIRNAME=$(dirname "$CONFIG") + cd "$DIRNAME" || exit 1 else echo "ERROR CONFIG." exit 1 @@ -27,4 +28,8 @@ if [ ! -f "letsencrypt.sh" ];then chmod +x letsencrypt.sh fi -./letsencrypt.sh -c -k ./dnspod-hook.sh -t dns-01 +if [ "$ECC" = "TRUE" ];then + ./letsencrypt.sh -c -k ./dnspod-hook.sh -t dns-01 -a secp384r1 +else + ./letsencrypt.sh -c -k ./dnspod-hook.sh -t dns-01 +fi