diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-04-20 08:48:28 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-11-08 10:17:56 +0100 |
commit | c4831d286498c6505a389af089abd9c1850e09ba (patch) | |
tree | 527a0295a3761ea7ad473f26d25a30c27a16be0c /debian | |
parent | Merge pull request #12276 from opensourcerouting/fix/ospf_wrong_arg (diff) | |
download | frr-c4831d286498c6505a389af089abd9c1850e09ba.tar.xz frr-c4831d286498c6505a389af089abd9c1850e09ba.zip |
packaging: Reuse frr.logrotate for Debian and Redhat builds
It will be easier to maintain a single file instead of two separate.
Also, fixes the issue when the file (/var/log/frr/frr.log) is not created
after logrotate.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'debian')
-rw-r--r-- | debian/frr.install | 1 | ||||
-rw-r--r-- | debian/frr.logrotate | 27 |
2 files changed, 1 insertions, 27 deletions
diff --git a/debian/frr.install b/debian/frr.install index 48263222f..044b48498 100644 --- a/debian/frr.install +++ b/debian/frr.install @@ -1,6 +1,7 @@ debian/frr.conf usr/lib/tmpfiles.d etc/ tools/etc/frr/frr.conf etc/frr/ +tools/etc/logrotate.d/frr etc/logrotate.d/ tools/frr-reload usr/lib/frr/ usr/bin/mtracebis usr/bin/vtysh diff --git a/debian/frr.logrotate b/debian/frr.logrotate deleted file mode 100644 index 735af6539..000000000 --- a/debian/frr.logrotate +++ /dev/null @@ -1,27 +0,0 @@ -/var/log/frr/*.log { - size 500k - sharedscripts - missingok - compress - rotate 14 - create 0640 frr frr - - postrotate - pid=$(lsof -t -a -c /syslog/ /var/log/frr/* 2>/dev/null) - if [ -n "$pid" ] - then # using syslog - kill -HUP $pid - fi - # in case using file logging; if switching back and forth - # between file and syslog, rsyslogd might still have file - # open, as well as the daemons, so always signal the daemons. - # It's safe, a NOP if (only) syslog is being used. - for i in babeld bgpd eigrpd isisd ldpd nhrpd ospf6d ospfd sharpd \ - pimd pim6d ripd ripngd zebra pathd pbrd staticd bfdd fabricd vrrpd; do - if [ -e /var/run/frr/$i.pid ] ; then - pids="$pids $(cat /var/run/frr/$i.pid)" - fi - done - [ -n "$pids" ] && kill -USR1 $pids || true - endscript -} |