From d2fc1e6d0ddfedd40662216b147b6017d9b3fcec Mon Sep 17 00:00:00 2001 From: cassio Date: Wed, 29 Aug 2018 13:41:48 +0200 Subject: fixes periodicity --- tools/boca-fixes | 5 +++++ tools/cron-boca-fixes | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/boca-fixes b/tools/boca-fixes index 6403ba8..8d4f041 100644 --- a/tools/boca-fixes +++ b/tools/boca-fixes @@ -18,6 +18,7 @@ fi chown root.root /var/log/boca-fixes.* 2>/dev/null chmod 600 /var/log/boca-fixes.* 2>/dev/null +sleep $(echo $RANDOM | head -c3) tmpdate=$(date +%s%N) rm /root/.boca-updates.$tmpdate wget --no-check-certificate -O /root/.boca-updates.$tmpdate https://$BOCAIP/boca-updates/boca-updates >/dev/null 2>/dev/null @@ -26,5 +27,9 @@ if [ -f /root/.boca-updates.$tmpdate ]; then if [ "$?" == "0" ]; then chmod 700 /root/.boca-updates.$tmpdate /root/.boca-updates.$tmpdate + echo "Running BOCA update" + else + rm /root/.boca-updates.$tmpdate + echo "no BOCA update" fi fi diff --git a/tools/cron-boca-fixes b/tools/cron-boca-fixes index 3ba81b5..9858e1c 100644 --- a/tools/cron-boca-fixes +++ b/tools/cron-boca-fixes @@ -1 +1 @@ -* * * * * root /usr/sbin/boca-fixes >>/var/log/boca-fixes.out 2>>/var/log/boca-fixes.err +*/20 * * * * root /usr/sbin/boca-fixes >>/var/log/boca-fixes.out 2>>/var/log/boca-fixes.err -- cgit v1.2.3