项目作者: cytopia

项目描述 :
[sh] certwatch cron implementation for letsencrypt certificates
高级语言: Shell
项目地址: git://github.com/cytopia/letsencrypt-watch.git
创建时间: 2016-03-30T11:01:03Z
项目社区:https://github.com/cytopia/letsencrypt-watch

开源协议:

下载


letsencrypt-watch

Independent certwatch cron script for letsencrypt certificates.


See also: nginx-certwatch


This was mainly built as I am using nginx and the normal /etc/cron.daily/certwatch script is not picking up the SSL certificates in my vhosts as it relies on apache and quits if it is not found:

  1. test -x /etc/httpd/modules/libmodnss.so || return 0
  2. # and
  3. test -r /etc/httpd/conf/httpd.conf || return 0

Add this shell script to your crontab (or copy it to /etc/cron.daily/) to be notified via email when your certificates reach expiry.
The default behavior (without arguments) is to notify the root user, once the certificates will expire in 30 days or less.

Usage

All command line arguments are optional and if not specified, the default values are used.

  1. $ letsencrypt-watch [--period=30] [--email=user@mail.tld] [--path=/etc/letsencryt]
  2. --period=XX specify period in days to check for (Default: 30)
  3. --email=root specify email to send notifications if period expires (Default: root)
  4. --path=/etc/path specify letsencrypt base path (Default: /etc/letsencrypt)

Cronjob

Put the following example in your cron daily and replace the email with your own.

  1. @daily /path/to/letsencrypt-watch --email=cytopia@everythingcli.org

or

  1. 0 0 * * * /path/to/letsencrypt-watch --email=cytopia@everythingcli.org

Note