手動でcertbotを実行させると次のエラーを吐いた
Unable to determine zone identifier for HOGE.DOMAIN.COM using zone names
いろいろ試してみたが、次のコマンドで上手くいったようだ
$ sudo dnf --enablerepo=epel install certbot python3-certbot-dns-sakuracloud $ sudo dnf install snapd --enablerepo=epel]]>
[ysrock@centos7 ~]$ sudo certbot delete Saving debug log to /var/log/letsencrypt/letsencrypt.log Which certificate(s) would you like to delete? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1: hogehoge.com 2: reminder.ysrock.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Select the appropriate numbers separated by commas and/or spaces, or leave input blank to select all options shown (Enter 'c' to cancel): 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deleted all files relating to certificate reminder.ysrock.com. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
既に設定済みのドメイン一覧が表示されるので
削除したいドメインの番号を入力する。
今回は2とタイプしてエンターを押した。
念のため、/etc/letsencrypt/配下のディレクトリを見てみたら
ちゃんと削除されていた。
Cronを使って自動更新させる
$ sudo crontab -u root -e # 毎月1日の朝3時に、Let's Encryptを自動更新 0 3 1 * * /bin/systemctl stop httpd && /usr/local/letsencrypt/letsencrypt-auto renew --force-renew && /bin/systemct start httpd 2>&1 | Mail foo@bar.com]]>