aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcassio <cassiopc@gmail.com>2018-08-29 13:33:27 +0000
committercassio <cassiopc@gmail.com>2018-08-29 13:33:27 +0000
commita8d63115ccd3f8d4a54826fcdb2d4a6d01125d67 (patch)
tree8c6f4ef92b8dd6ec035971169caa427847721552
parentb117763dfafeec631c47a8fca6880400c5c6d854 (diff)
downloadboca-a8d63115ccd3f8d4a54826fcdb2d4a6d01125d67.tar.gz
boca-a8d63115ccd3f8d4a54826fcdb2d4a6d01125d67.zip
bf
-rw-r--r--tools/boca-fixes15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/boca-fixes b/tools/boca-fixes
index 8d4f041..8d16ea8 100644
--- a/tools/boca-fixes
+++ b/tools/boca-fixes
@@ -20,16 +20,17 @@ 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
-if [ -f /root/.boca-updates.$tmpdate ]; then
- grep -q boca-updates /root/.boca-updates.$tmpdate
+tmpfile=/root/.boca-updates.$tmpdate
+rm $tmpfile
+wget --no-check-certificate -O $tmpfile https://$BOCAIP/boca-updates/boca-updates >/dev/null 2>/dev/null
+if [ -f $tmpfile ]; then
+ grep -q boca-updates $tmpfile
if [ "$?" == "0" ]; then
- chmod 700 /root/.boca-updates.$tmpdate
- /root/.boca-updates.$tmpdate
+ chmod 700 $tmpfile
echo "Running BOCA update"
+ . $tmpfile
else
- rm /root/.boca-updates.$tmpdate
+ rm $tmpfile
echo "no BOCA update"
fi
fi