leave system cron alone

Taking JoshKastang’s idea from #153, the system cron file will be left
alone and the pihole.cron gets its own.
This commit is contained in:
jacobsalmela 2016-01-16 13:48:29 -06:00
parent 7c6ef0cfd0
commit 5d608a2db5
2 changed files with 5 additions and 17 deletions

View File

@ -1,22 +1,11 @@
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
# Pi-hole: Update the ad sources once a week on Sunday at 01:59
# Download any updates from the ad lists
59 1 * * 7 root /usr/local/bin/gravity.sh
# Pi-hole: Update the Web interface shortly after gravity runs
# This should also update the version number if it is changed in the dashboard repo
30 2 * * 7 root /usr/local/bin/updateDashboard.sh
# Pi-hole: Parse the log file before it is flushed and save the stats to a database
# This will be used for a historical view of your Pi-hole's performance
#50 23 * * * root /usr/local/bin/dailyLog.sh

View File

@ -260,8 +260,7 @@ $SUDO curl -o /var/www/html/pihole/index.html https://raw.githubusercontent.com/
}
installCron(){
$SUDO mv /etc/crontab /etc/crontab.orig
$SUDO curl -o /etc/crontab https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/pihole.cron
$SUDO curl -o /etc/cron.d/pihole https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/pihole.cron
}
installPihole()