Debian Codegraph @

debian/logrotate

raw
1 /var/log/mirrorbits/*.log {
2 daily
3 rotate 14
4 missingok
5 notifempty
6 compress
7 delaycompress
8 postrotate
9 if [ -e /run/systemd/system ]; then
10 if systemctl -q is-active mirrorbits; then
11 systemctl kill -s USR1 mirrorbits
12 fi
13 elif [ -s /run/mirrorbits/pid ]; then
14 pid=$(cat /run/mirrorbits/pid)
15 kill -s USR1 "$pid" 2>/dev/null || true
16 fi
17 endscript
18 }
19
20 /var/log/mirrorbits/*/*.log {
21 daily
22 rotate 14
23 missingok
24 notifempty
25 compress
26 delaycompress
27 postrotate
28 dir=$(dirname "$1")
29 i=$(basename "$dir")
30 if [ -e /run/systemd/system ]; then
31 if systemctl -q is-active mirrorbits@"$i"; then
32 systemctl kill -s USR1 mirrorbits@"$i"
33 fi
34 elif [ -s /run/mirrorbits/"$i"/pid ]; then
35 pid=$(cat /run/mirrorbits/"$i"/pid)
36 kill -s USR1 "$pid" 2>/dev/null || true
37 fi
38 endscript
39 }