Amazon Linux 2023 (crond非標準、systemd タイマー機能 推奨) 環境
サービス再起動の設定
/etc/sysconfig/certbot
証明書更新処理後の httpd (apache2) の再起動を設定する。
1 2 |
- # POST_HOOK="" + # POST_HOOK="--post-hook 'systemctl restart httpd'" |
systemd timer の有効化
1 |
$ sudo systemctl enable --now certbot-renew.timer |
timer の確認
1 2 3 4 5 |
$ systemctl list-timers NEXT LEFT LAST PASSED UNIT ACTIVATES ... Wed 2025-02-19 00:07:00 JST 4h 51min left Tue 2025-02-18 00:07:02 JST 19h ago sysstat-summary.timer sysstat-summary.service Wed 2025-02-19 11:14:49 JST 15h left - - certbot-renew.timer certbot-renew.service |