Last active
November 8, 2016 15:05
-
-
Save Sankame/44a737ee39412c62b48a3392625569c6 to your computer and use it in GitHub Desktop.
Let's Encrypt SSL証明書更新
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/bash | |
COMMAND='/usr/local/src/certbot/certbot-auto renew --force-renew --non-interactive' | |
LOG=/var/log/letsencrypt/renew.log | |
date '+%Y-%m-%d %H:%M:%S >>>' >> $LOG | |
if ! $COMMAND >> $LOG 2>&1 ; then | |
echo ' Automated renewal failed' >> $LOG | |
exit 1 | |
fi | |
/sbin/service httpd restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
下記オプションを追加して自動更新で止まらないようにした。
--non-interactive