Update SSL certificates via an https-update script

This commit is contained in:
Calin Crisan 2019-11-03 14:35:54 +02:00
parent 9f02ffd3ab
commit b80d80a111
3 changed files with 14 additions and 2 deletions

View File

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

View File

@ -13,4 +13,4 @@ mkdir -p "${BASE_DIR}"
mkdir -p "${TMP_DIR}"
logger -t dehydrated "checking for certificate renewal"
dehydrated -c
dehydrated "$@"

View File

@ -0,0 +1,12 @@
#!/bin/bash
PROG="/usr/sbin/dehydrated-wrapper"
SSL_DIR="/data/etc/ssl"
if ! [[ -d "${SSL_DIR}" ]]; then
exit 0
fi
logger -t dehydrated "updating SSL certificates"
${PROG} -c 2>&1 | logger -t dehydrated
exit ${PIPESTATUS[0]}