From dba1df9bf886e9943eb75eb985cedc0eb3165eb7 Mon Sep 17 00:00:00 2001 From: Jason Learst Date: Thu, 15 Oct 2015 00:29:09 -0400 Subject: [PATCH] Add cron job to auto update block lists once a week. --- automated install/basic-install.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 80bb7543..1f704abc 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -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 '\' /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