X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=debian%2Fopenvswitch-switch.logrotate;h=a7a71bdd90ad8f64b901d68136f45390500f3dd0;hb=HEAD;hp=3da57e09158430c1c6163937380d5cb81e3db97b;hpb=a0bc29a541fc7dc6e20137d5558e2094d614e6ab;p=sliver-openvswitch.git diff --git a/debian/openvswitch-switch.logrotate b/debian/openvswitch-switch.logrotate index 3da57e091..a7a71bdd9 100644 --- a/debian/openvswitch-switch.logrotate +++ b/debian/openvswitch-switch.logrotate @@ -1,11 +1,16 @@ -/var/log/openvswitch/ovs-openflowd.log { - daily - compress - create 640 root adm - delaycompress - missingok - rotate 30 - postrotate - ovs-appctl --target=ovs-openflowd vlog/reopen - endscript +/var/log/openvswitch/*.log { + daily + compress + create 640 root adm + delaycompress + missingok + rotate 30 + postrotate + # Tell Open vSwitch daemons to reopen their log files + if [ -d /var/run/openvswitch ]; then + for pidfile in `cd /var/run/openvswitch && echo *.pid`; do + ovs-appctl -t "${pidfile%%.pid}" vlog/reopen + done + fi + endscript }