about summary refs log tree commit diff stats
path: root/linux/conf/logrotate.d/samhain
blob: d60f810443aa754aa08016d80ef1d701a3d7188a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/var/log/samhain.log {
    weekly
    rotate 52
    nocreate
    missingok
    compress

    prerotate
        if test -f /var/run/samhain.pid; then \
          PIN=`cat /var/run/samhain.pid`; \
          /bin/kill -TTIN $PIN; \
          sleep 1; \
          AA=0; \
          while test "x$AA" != "x120"; do \
           AA=$(( AA + 1 )); \
           if test -f /var/log/samhain.log.lock; then \
             sleep 1; \
           else \
             break; \
           fi \
          done; \
        fi
    endscript
}