]> Frank Brehm's Git Trees - frank-procmail.git/commitdiff
Bugfixing
authorFrank Brehm <frank@brehm-online.com>
Mon, 2 May 2016 08:36:18 +0000 (10:36 +0200)
committerFrank Brehm <frank@brehm-online.com>
Mon, 2 May 2016 08:36:18 +0000 (10:36 +0200)
rotate

diff --git a/rotate b/rotate
index b80defb3eb64637406e28ca8b72519f7cf4b6c36..d51695fa6a2b93839277ecd0b0de79afd91f717f 100755 (executable)
--- a/rotate
+++ b/rotate
@@ -1,14 +1,18 @@
 #!/bin/bash
 
-MINZIZE="524288"
+MINZIZE="1048576"
 DO_ROTATE="n"
 
 cd /home/frank/.procmail || exit 5
 
 if [[ -s procmail.log ]] ; then
     CURZIZE=$( stat -c '%s' procmail.log )
-    if [[ -n "${MINZIZE}" && "${CURZIZE}" -ge "${MINZIZE}" ]] ; then
-        DO_ROTATE="y"
+    if [[ -n "${MINZIZE}" ]] ; then
+        if [[ "${CURZIZE}" -ge "${MINZIZE}" ]] ; then
+            DO_ROTATE="y"
+        else
+            DO_ROTATE="n"
+        fi
     else
         DO_ROTATE="y"
     fi