diff options
| author | Cassio de Campos <cassiopc@gmail.com> | 2017-08-12 21:36:10 +0000 |
|---|---|---|
| committer | Cassio de Campos <cassiopc@gmail.com> | 2017-08-12 21:36:10 +0000 |
| commit | cf9f2f18d83d7cbf17933e3047e0105ad9ba1721 (patch) | |
| tree | 04ee48feb286cefbbd97afa6ae9e717beaf2704b /tools/cron-logroot.sh | |
| parent | 0f05c39f0b59babd02e85bbc1d9bdf40c53a3cd6 (diff) | |
| download | boca-cf9f2f18d83d7cbf17933e3047e0105ad9ba1721.tar.gz boca-cf9f2f18d83d7cbf17933e3047e0105ad9ba1721.zip | |
bug fix
Diffstat (limited to 'tools/cron-logroot.sh')
| -rw-r--r-- | tools/cron-logroot.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/cron-logroot.sh b/tools/cron-logroot.sh index dbae238..1199288 100644 --- a/tools/cron-logroot.sh +++ b/tools/cron-logroot.sh @@ -17,7 +17,7 @@ fi grep "session opened for user root" /var/log/auth.log |grep -v cron:session | grep -v systemd:session | tail -n 100 > /root/.logroot.tmp [ -f /root/.logroot ] || touch /root/.logroot -diff /root/.logroot /root/.logroot.tmp | grep "^>" > /root/.logroot.diff 2>/dev/null +diff /root/.logroot /root/.logroot.tmp > /root/.logroot.diff 2>/dev/null res=$? mv /root/.logroot.tmp /root/.logroot if [ "$res" != "0" ]; then @@ -41,7 +41,7 @@ if [ "$res" != "0" ]; then echo -n "comp=`cat /root/submissions/comp`" > $temp echo -n "&code=$res" >> $temp echo -n "&data=" >> $temp - uuencode -m zzzzzzzzzz < /root/.logroot.diff | grep -v "begin-base64.*zzzzzzzzzz" | perl -MURI::Escape -lne 'print uri_escape($_)' >> $temp + grep "^>" /root/.logroot.diff | uuencode -m zzzzzzzzzz | grep -v "begin-base64.*zzzzzzzzzz" | perl -MURI::Escape -lne 'print uri_escape($_)' >> $temp wget --no-check-certificate -t 2 -T 5 "https://$BOCASERVER/boca/logexternal.php" --load-cookies ${temp}.cookie.txt --keep-session-cookies --save-cookies ${temp}.cookie.txt -O ${temp}.out --post-file=$temp >/dev/null 2>/dev/null rm -f $temp |