anudeepND / whitelist

A simple tool to add commonly white listed domains to your Pi-Hole setup.
MIT License
4.18k stars 281 forks source link

Move cron to cron.d #197

Open T81 opened 3 years ago

T81 commented 3 years ago

My pihole and whitelist installation is on an Ubuntu server. Not a Pi distro. Checking CRON logs (sudo grep CRON /var/log/syslog) I see no entry for whitelist job. The cron is installed in the user's crontab but the script relies on sudo. sudo asks for password prompt so it doesn't work on my server. I have moved the cron to /etc/cron.d/whitelist:

# Update whitelist at 01:00 on every 7th day-of-week
0 1 * * */7     root    PATH="$PATH:/usr/sbin:/usr/local/bin/" python3 /opt/whitelist/scripts/whitelist.py