Created
February 1, 2021 03:53
-
-
Save zengxs/e1b7fcb73a9b6bbcb025f2bdb0892276 to your computer and use it in GitHub Desktop.
SSL certificates renew script for ZeroSSL using lego.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export CLOUDFLARE_EMAIL='[REDACT: your cloudflare email]' | |
export CLOUDFLARE_API_KEY='[REDACT: your cloudflare api key]' | |
lego \ | |
--server https://acme.zerossl.com/v2/DV90 \ | |
--accept-tos \ | |
--path /srv/lego \ | |
--eab \ | |
--kid '[REDACT:KQ******************iQ]' \ | |
--hmac '[REDACT:gfdhdsJE**********************************************************************jZOlTo7w]' \ | |
--email '[REDACT:your email]' \ | |
-d '[REDACT:your domain, eg: example.com or *.example.com]' \ | |
-d '[REDACT:your another domain]' \ | |
--key-type rsa2048 \ | |
--dns cloudflare \ | |
renew \ | |
--must-staple \ | |
--reuse-key \ | |
--days 45 \ | |
--renew-hook 'sudo nginx -s reload' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment