Dehydrated: add cron helper

This commit is contained in:
Calin Crisan 2019-10-31 23:58:29 +02:00
parent 822c04d424
commit 250857f10f
2 changed files with 17 additions and 1 deletions

View File

@ -1,2 +1,2 @@
14 3 * * * /usr/sbin/logrotate /etc/logrotate.conf 14 3 * * * /usr/sbin/logrotate /etc/logrotate.conf
0 2 * * 0 /usr/sbin/dehydrated-wrapper

View File

@ -0,0 +1,16 @@
#!/bin/bash
PROG="/usr/bin/dehydrated"
BASE_DIR="/var/lib/dehydrated"
TMP_DIR="/tmp/dehydrated"
SSL_DIR="/data/etc/ssl"
if ! [[ -x "${PROG}" && -r "${SSL_DIR}/domain" && -r "${SSL_DIR}/email" ]]; then
exit 0 # not installed or not configured
fi
mkdir -p "${BASE_DIR}"
mkdir -p "${TMP_DIR}"
logger -t dehydrated "checking for certificate renewal"
dehydrated -c