X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=debian%2Fopenvswitch-switch.logrotate;h=a7a71bdd90ad8f64b901d68136f45390500f3dd0;hb=HEAD;hp=a45cc2a76d30bc8514c5e943ec1cf984336d7d6f;hpb=576e26d7b47f4e53116ef0b5f035d260f426d37b;p=sliver-openvswitch.git diff --git a/debian/openvswitch-switch.logrotate b/debian/openvswitch-switch.logrotate index a45cc2a76..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 /var/run/ovs-openflowd.pid --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 }