]> git.proxmox.com Git - openvswitch.git/blobdiff - debian/openvswitch-switch.logrotate
add debian sid (ovs 2.11) "debian" directory
[openvswitch.git] / debian / openvswitch-switch.logrotate
diff --git a/debian/openvswitch-switch.logrotate b/debian/openvswitch-switch.logrotate
new file mode 100644 (file)
index 0000000..a7a71bd
--- /dev/null
@@ -0,0 +1,16 @@
+/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
+}