]> git.proxmox.com Git - mirror_frr.git/blame - debianpkg/frr.logrotate
zebra: Refactor kernel_rtm to be a bit smarter about how it handles options
[mirror_frr.git] / debianpkg / frr.logrotate
CommitLineData
d8e4c438 1/var/log/frr/*.log {
4774fe1b 2 size 500k
4d916382
DS
3 sharedscripts
4 missingok
5 compress
6 rotate 14
d8e4c438 7 create 640 frr frrvty
4d916382
DS
8
9 postrotate
a7c9d77a
DO
10 pid=$(lsof -t -a -c /syslog/ /var/log/frr/* 2>/dev/null)
11 if [ -n "$pid" ]
12 then # using syslog
13 kill -HUP $pid
14 fi
15 # in case using file logging; if switching back and forth
16 # between file and syslog, rsyslogd might still have file
17 # open, as well as the daemons, so always signal the daemons.
18 # It's safe, a NOP if (only) syslog is being used.
19 for i in babeld bgpd eigrpd isisd ldpd nhrpd ospf6d ospfd \
bf8e16b5 20 pimd ripd ripngd zebra staticd fabricd; do
a7c9d77a
DO
21 if [ -e /var/run/frr/$i.pid ] ; then
22 pids="$pids $(cat /var/run/frr/$i.pid)"
23 fi
24 done
83aadaa6 25 [ -n "$pids" ] && kill -USR1 $pids || true
4d916382
DS
26 endscript
27}