Created
November 28, 2019 06:50
-
-
Save richardevs/585deadee542b24fafa85a4096c07ce6 to your computer and use it in GitHub Desktop.
Renew all acme.sh certs and restart nginx
This file contains hidden or 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
export LE_WORKING_DIR="/root/.acme.sh" | |
alias acme.sh="/root/.acme.sh/acme.sh" | |
[ -d /root/acme_logs ] || mkdir /root/acme_logs | |
for i in $(/root/.acme.sh/acme.sh --list | sed 1d | awk '{print $1}'); do | |
touch /root/acme_logs/$i.$(date +%Y%m%d) | |
# If you do not have ecc certificate, remove the "--ecc" option below | |
/root/.acme.sh/acme.sh --renew -d $i --ecc >> /root/acme_logs/$i.$(date +%Y%m%d) | |
done | |
nginx -t && kill -s HUP $(pgrep nginx) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment