mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
Dehydrated: add cron helper
This commit is contained in:
parent
822c04d424
commit
250857f10f
@ -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
|
||||||
|
16
board/common/overlay/usr/sbin/dehydrated-wrapper
Executable file
16
board/common/overlay/usr/sbin/dehydrated-wrapper
Executable 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
|
Loading…
x
Reference in New Issue
Block a user