Skip to content

Instantly share code, notes, and snippets.

@Sankame
Last active November 8, 2016 15:05
Show Gist options
  • Save Sankame/44a737ee39412c62b48a3392625569c6 to your computer and use it in GitHub Desktop.
Save Sankame/44a737ee39412c62b48a3392625569c6 to your computer and use it in GitHub Desktop.
Let's Encrypt SSL証明書更新
#!/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
@Sankame
Copy link
Author

Sankame commented Nov 8, 2016

下記オプションを追加して自動更新で止まらないようにした。
--non-interactive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment