1
1
mirror of https://github.com/dnscrypt/dnscrypt-server-docker synced 2026-01-18 20:31:34 +01:00

Force a rotation if we don't have a key at all

This commit is contained in:
Frank Denis 2015-07-12 15:43:57 +02:00
parent 83bac6f5da
commit 578c25b9f7

@ -8,10 +8,14 @@ prune() {
}
rotation_needed() {
if [ $(find "$STKEYS_DIR" -type f -cmin -43200 -print -quit | wc -l | sed 's/[^0-9]//g') -le 0 ]; then
if [ ! -f "${STKEYS_DIR}/dnscrypt.cert" ]; then
echo true
else
echo false
if [ $(find "$STKEYS_DIR" -type f -cmin -43200 -print -quit | wc -l | sed 's/[^0-9]//g') -le 0 ]; then
echo true
else
echo false
fi
fi
}