summaryrefslogtreecommitdiff
path: root/debian/openvswitch-switch.logrotate
diff options
context:
space:
mode:
Diffstat (limited to 'debian/openvswitch-switch.logrotate')
-rw-r--r--debian/openvswitch-switch.logrotate16
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/openvswitch-switch.logrotate b/debian/openvswitch-switch.logrotate
new file mode 100644
index 000000000..f42029d0c
--- /dev/null
+++ b/debian/openvswitch-switch.logrotate
@@ -0,0 +1,16 @@
+/var/log/openvswitch/*.log {
+ daily
+ compress
+ sharedscripts
+ create 640 root adm
+ missingok
+ rotate 30
+ postrotate
+ # Tell Open vSwitch daemons to reopen their log files
+ if [ -d /var/run/openvswitch ]; then
+ for ctl in /var/run/openvswitch/*.ctl; do
+ ovs-appctl -t "$ctl" vlog/reopen 2>/dev/null || :
+ done
+ fi
+ endscript
+}