Advertisement
Squito

Automatic certbot renewal

Oct 29th, 2016
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. # Content of /etc/systemd/system/certbot.service:
  2.  
  3. [Unit]
  4. Description=Let's Encrypt renewal
  5.  
  6. [Service]
  7. Type=oneshot
  8. ExecStart=/usr/bin/certbot renew --quiet --agree-tos
  9. ExecStartPost=/bin/systemctl reload apache2
  10.  
  11. # Content of /etc/systemd/system/certbot.timer:
  12.  
  13. [Unit]
  14. Description=Monthly renewal of Let's Encrypt's certificates
  15.  
  16. [Timer]
  17. OnCalendar=*-*-1,15 00:00:00
  18. RandomizedDelaySec=1day
  19. Persistent=true
  20.  
  21. [Install]
  22. WantedBy=timers.target
  23.  
  24. # Commands after file creations:
  25. # systemctl enable certbot.timer
  26. # systemctl start certbot.timer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement