From bfe00dcb8b978e78e57ce4b2eb285989f6025b94 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Fri, 18 Aug 2017 16:47:19 +0100 Subject: fix sleeping times --- tools/boca-submit-logroot | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/boca-submit-logroot') diff --git a/tools/boca-submit-logroot b/tools/boca-submit-logroot index 0cf2ce5..4b5d54e 100644 --- a/tools/boca-submit-logroot +++ b/tools/boca-submit-logroot @@ -15,6 +15,8 @@ if [ "$BOCASERVER" == "" ]; then exit 1 fi +for zcount in 1 2 3 4; do + 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 > /root/.logroot.diff 2>/dev/null @@ -58,4 +60,7 @@ if [ "$res" != "0" ]; then fi fi mv /root/.logroot.tmp /root/.logroot +[ "$zcount" == "4" ] || sleep 15 +done + exit 0 -- cgit v1.2.3