mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-30 18:13:18 +00:00
Add cron job to auto update block lists once a week.
This commit is contained in:
parent
963eacfe05
commit
dba1df9bf8
1 changed files with 11 additions and 0 deletions
|
@ -78,5 +78,16 @@ sudo chmod 755 /usr/local/bin/chronometer.sh
|
|||
echo "Entering the event horizon..."
|
||||
sudo /usr/local/bin/gravity.sh
|
||||
|
||||
echo "Autoupdate script installation..."
|
||||
crontab -l > /tmp/mycron
|
||||
if grep -qi '\<gravity\>' /tmp/mycron
|
||||
then
|
||||
echo "Autoupdate already configured"
|
||||
else
|
||||
echo "0 * * * * sudo /usr/local/bin/gravity.sh" >> /tmp/mycron
|
||||
crontab /tmp/mycron
|
||||
fi
|
||||
rm /tmp/mycron
|
||||
|
||||
echo "Restarting..."
|
||||
sudo shutdown -r now
|
||||
|
|
Loading…
Reference in a new issue