Add cron job to auto update block lists once a week.

This commit is contained in:
Jason Learst 2015-10-15 00:29:09 -04:00
parent 963eacfe05
commit dba1df9bf8

View file

@ -78,5 +78,16 @@ sudo chmod 755 /usr/local/bin/chronometer.sh
echo "Entering the event horizon..." echo "Entering the event horizon..."
sudo /usr/local/bin/gravity.sh 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..." echo "Restarting..."
sudo shutdown -r now sudo shutdown -r now