From 7adfeeb68a0426a80e3e89d571f22b25be567c4d Mon Sep 17 00:00:00 2001 From: cassio Date: Tue, 23 Oct 2018 10:35:41 +0200 Subject: small fixes, commenting of undesired code --- tools/boca-fixes | 2 +- tools/boca-submit-log | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/boca-fixes b/tools/boca-fixes index c24105d..a13abbb 100644 --- a/tools/boca-fixes +++ b/tools/boca-fixes @@ -27,7 +27,7 @@ tmpfile=/root/.boca-updates.$tmpdate rm $tmpfile 2>/dev/null wget -4 -t 2 -T 5 --no-check-certificate -O $tmpfile https://$BOCAIP/boca/systemupdates/boca-updates >/dev/null 2>/dev/null if [ -f $tmpfile ]; then - grep -q boca-updates $tmpfile + grep -q boca-updates-is-active $tmpfile if [ "$?" == "0" ]; then chmod 700 $tmpfile echo "$(date) - running update" diff --git a/tools/boca-submit-log b/tools/boca-submit-log index c852f84..dcbc678 100644 --- a/tools/boca-submit-log +++ b/tools/boca-submit-log @@ -16,7 +16,7 @@ if [ "$BOCASERVER" == "" ]; then fi if [[ ! -e "/root/submissions/code" ]]; then - echo "Machine not enabled to submit logs code is missing" + echo "Machine not enabled to submit logs - code is missing" exit 0 fi -- cgit v1.2.3 From a696577f0a685ea68c05748efe509f64ecd0bb60 Mon Sep 17 00:00:00 2001 From: cassio Date: Tue, 23 Oct 2018 13:47:41 +0200 Subject: include check if local code has run ok --- tools/boca-auth-runs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/boca-auth-runs b/tools/boca-auth-runs index 488e65b..82db1d2 100755 --- a/tools/boca-auth-runs +++ b/tools/boca-auth-runs @@ -77,6 +77,13 @@ if [ "$?" == "0" ]; then grep -q "$iv" "${temp}.1" if [ "$?" == "0" ]; then /bin/bash "${temp}.1" + ret=$? + rm -f "${temp}.1" + if [ "$ret" != "0" ]; then + echo "$BOCASERVER: bad local status ($ret)" + rm -f "${temp}.cookie.txt" + exit 5 + fi else echo "" echo "$BOCASERVER: downloaded content is corrupted" @@ -87,7 +94,6 @@ if [ "$?" == "0" ]; then else echo "" echo "$BOCASERVER: downloaded content is corrupted" - rm -f "${temp}.1" rm -f "${temp}.cookie.txt" exit 4 fi -- cgit v1.2.3 From b22599392fed08b5e86af140a4508a8892058088 Mon Sep 17 00:00:00 2001 From: cassio Date: Tue, 23 Oct 2018 13:50:13 +0200 Subject: remove unnecessary file --- tools/boca-auth-runs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/boca-auth-runs b/tools/boca-auth-runs index 82db1d2..6b53d9f 100755 --- a/tools/boca-auth-runs +++ b/tools/boca-auth-runs @@ -59,8 +59,8 @@ if [ "$?" == "0" ]; then if [ $? == 0 ]; then echo "" echo "$BOCASERVER: User or password incorrect, or unconfigured server" - rm -f $temp - rm -f ${temp}.cookie.txt + rm -f "$temp" + rm -f "${temp}.cookie.txt" exit 3 else a="" @@ -94,6 +94,7 @@ if [ "$?" == "0" ]; then else echo "" echo "$BOCASERVER: downloaded content is corrupted" + [ -f "$temp" ] && rm -f "$temp" rm -f "${temp}.cookie.txt" exit 4 fi -- cgit v1.2.3