aboutsummaryrefslogtreecommitdiff
path: root/tools/cron-logroot.sh
diff options
context:
space:
mode:
authorCassio de Campos <cassiopc@gmail.com>2017-08-12 21:36:10 +0000
committerCassio de Campos <cassiopc@gmail.com>2017-08-12 21:36:10 +0000
commitcf9f2f18d83d7cbf17933e3047e0105ad9ba1721 (patch)
tree04ee48feb286cefbbd97afa6ae9e717beaf2704b /tools/cron-logroot.sh
parent0f05c39f0b59babd02e85bbc1d9bdf40c53a3cd6 (diff)
downloadboca-cf9f2f18d83d7cbf17933e3047e0105ad9ba1721.tar.gz
boca-cf9f2f18d83d7cbf17933e3047e0105ad9ba1721.zip
bug fix
Diffstat (limited to 'tools/cron-logroot.sh')
-rw-r--r--tools/cron-logroot.sh4
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