diff options
| author | cassio <cassiopc@gmail.com> | 2018-08-27 15:52:12 +0000 |
|---|---|---|
| committer | cassio <cassiopc@gmail.com> | 2018-08-27 15:52:12 +0000 |
| commit | c8284a969b084df4e801a1a3e43e400466a99051 (patch) | |
| tree | 684d6b1bbf7a5c0656ce8ce746425a8d7e9bae69 | |
| parent | e4bc052cecd49e4b2b2cd71c025d92a8e398f57c (diff) | |
| download | boca-c8284a969b084df4e801a1a3e43e400466a99051.tar.gz boca-c8284a969b084df4e801a1a3e43e400466a99051.zip | |
reduce net traffic
| -rw-r--r-- | tools/boca-submit-log | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/boca-submit-log b/tools/boca-submit-log index 36767b3..5f3034b 100644 --- a/tools/boca-submit-log +++ b/tools/boca-submit-log @@ -15,7 +15,7 @@ if [ "$BOCASERVER" == "" ]; then exit 1 fi -for zcount in 1 2 3 4 5 6 7 8 9 10 11 12; do +for zcount in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do grep -e sudo -e "password:session" /var/log/auth.log | tail -n 100 > /root/.logsession.tmp [ -f /root/.logsession ] || touch /root/.logsession @@ -37,11 +37,11 @@ for zcount in 1 2 3 4 5 6 7 8 9 10 11 12; do diff /root/.logkeys /root/.logkeys.tmp > /root/.logkeys.diff 2>/dev/null reskeys=$? else - echo "" > /root/.logkeys.diff + echo -n "" > /root/.logkeys.diff reskeys=0 fi - if [ "$res" != "0" -o "$resfs" != "0" -o "$reskfs" != "0" -o "$reskey" != "0" ]; then + if [ "$res" != "0" -o "$resfs" != "0" -o "$reskfs" != "0" -o "$reskeys" != "0" ]; then for i in uuencode wget tr perl sha256sum cut; do p=`which $i` if [ -x "$p" ]; then @@ -89,7 +89,7 @@ for zcount in 1 2 3 4 5 6 7 8 9 10 11 12; do [ -f /root/.logkeys.tmp ] && mv /root/.logkeys.tmp /root/.logkeys [ -f /root/.logfs.tmp ] && mv /root/.logfs.tmp /root/.logfs [ -f /root/.logkfs.tmp ] && mv /root/.logkfs.tmp /root/.logkfs - [ "$zcount" == "12" ] || sleep 10 + [ "$zcount" == "15" ] || sleep 10 done exit 0 |