HTTPS化(certbot の自動通知設定確認)

Linux・CLI・DevOpsカテゴリを表すパンダのイラスト Linux・CLI・DevOps

以下のサイトを参考に確認させていただきました。ありがとうございます。

インストールのコマンド

sudo certbot certonly --webroot -w /var/www/papanda925.com -d papanda925.com

インストール後、nginxのコンフィグを設定して完了する。

今回の趣旨は、certbotで自動更新処理が自動で設定されているかの再確認

(1) 自動更新設定の確認 list-timers

papanda925@papandaSV:/lib/systemd/system$ sudo systemctl list-timers
NEXT                        LEFT          LAST                        PASSED       UNIT                         ACTIVATES        >
Sun 2020-09-13 22:39:00 JST 21min left    Sun 2020-09-13 22:09:05 JST 8min ago     phpsessionclean.timer        phpsessionclean.s>
Mon 2020-09-14 00:00:00 JST 1h 42min left Sun 2020-09-13 00:00:05 JST 22h ago      NoticeIP.timer               NoticeIP.service >
Mon 2020-09-14 00:00:00 JST 1h 42min left Fri 2020-09-11 19:29:59 JST 2 days ago   fstrim.timer                 fstrim.service   >
Mon 2020-09-14 00:00:00 JST 1h 42min left Sun 2020-09-13 00:00:05 JST 22h ago      logrotate.timer              logrotate.service>
Mon 2020-09-14 00:00:00 JST 1h 42min left Sun 2020-09-13 00:00:05 JST 22h ago      man-db.timer                 man-db.service   >
Mon 2020-09-14 00:11:54 JST 1h 54min left Sun 2020-09-13 00:11:54 JST 22h ago      systemd-tmpfiles-clean.timer systemd-tmpfiles->
Mon 2020-09-14 02:17:08 JST 3h 59min left Sun 2020-09-13 12:01:33 JST 10h ago      certbot.timer                certbot.service  >
Mon 2020-09-14 04:50:43 JST 6h left       Sun 2020-09-13 14:45:34 JST 7h ago       apt-daily.timer              apt-daily.service>
Mon 2020-09-14 06:11:35 JST 7h left       Sun 2020-09-13 06:58:01 JST 15h ago      apt-daily-upgrade.timer      apt-daily-upgrade>
Mon 2020-09-14 08:06:35 JST 9h left       Sun 2020-09-13 21:08:46 JST 1h 8min ago  fwupd-refresh.timer          fwupd-refresh.ser>
Mon 2020-09-14 11:39:24 JST 13h left      Sun 2020-09-13 16:52:05 JST 5h 25min ago motd-news.timer              motd-news.service>
Sun 2020-09-20 03:10:03 JST 6 days left   Sun 2020-09-13 03:10:54 JST 19h ago      e2scrub_all.timer            e2scrub_all.servi>

12 timers listed.
Pass --all to see loaded but inactive timers, too.
lines 1-16/16 (END)

certbot.timer が登録済みであることを確認

サービスの中身も確認

(2)各種ファイルの中身確認

papanda925@papandaSV:/lib/systemd/system$ ls -al /lib/systemd/system | grep certbot
-rw-r--r--  1 root root   233  5月 27  2018 certbot.service
-rw-r--r--  1 root root   156  5月 27  2018 certbot.timer
papanda925@papandaSV:/lib/systemd/system$

これで、systemdに存在することを確認

papanda925@papandaSV:/lib/systemd/system$ cat certbot.service
[Unit]
Description=Certbot
Documentation=file:///usr/share/doc/python-certbot-doc/html/index.html
Documentation=https://letsencrypt.readthedocs.io/en/latest/
[Service]
Type=oneshot
ExecStart=/usr/bin/certbot -q renew
PrivateTmp=true
papanda925@papandaSV:/lib/systemd/system$
papanda925@papandaSV:/lib/systemd/system$ cat certbot.timer
[Unit]
Description=Run certbot twice daily

[Timer]
OnCalendar=*-*-* 00,12:00:00
RandomizedDelaySec=43200
Persistent=true

[Install]
WantedBy=timers.target

文書情報

記事タイトル
HTTPS化(certbot の自動通知設定確認)
作成日
更新日
Source URL
https://papanda925.com/?p=690

ライセンス: 本記事のうち、当サイトが権利を有する本文・自作図表は、特記なき限り CC BY 4.0 で利用できます。生成AIを活用して作成・編集した内容を含みます。コードについて、別途ライセンス表示またはリンク先GitHubリポジトリのライセンスがある場合は、その条件を優先します。引用・第三者資料・画像・商標等は本ライセンスの対象外です。 利用ポリシー

タイトルとURLをコピーしました