]> git.proxmox.com Git - mirror_frr.git/blame - debian/frr.logrotate
Merge pull request #11229 from anlancs/fix/zebra-nb-remove-checknode
[mirror_frr.git] / debian / frr.logrotate
CommitLineData
d8e4c438 1/var/log/frr/*.log {
4774fe1b 2 size 500k
4d916382
DS
3 sharedscripts
4 missingok
5 compress
6 rotate 14
b5b09eee 7 create 0640 frr frr
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.
f57a88f3 19 for i in babeld bgpd eigrpd isisd ldpd nhrpd ospf6d ospfd sharpd \
03ea2db7 20 pimd ripd ripngd zebra pathd pbrd staticd bfdd fabricd vrrpd; 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}