Randomize gravity update time between 03:01 - 04:58 (excluding 04:00)

Signed-off-by: DL6ER <dl6er@dl6er.de>
pull/1747/head
DL6ER 7 years ago
parent c34c3eb016
commit 06764d0f36
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

@ -1357,7 +1357,7 @@ installCron() {
# Copy the cron file over from the local repo
cp ${PI_HOLE_LOCAL_REPO}/advanced/pihole.cron /etc/cron.d/pihole
# Randomize gravity update time
sed -i "s/59 1/$((RANDOM % 60)) $((2 + RANDOM % 2))/" /etc/cron.d/pihole
sed -i "s/59 1/$((1 + RANDOM % 58)) $((3 + RANDOM % 2))/" /etc/cron.d/pihole
echo -e "${OVER} ${TICK} ${str}"
}

Loading…
Cancel
Save