/var/log/openvswitch/*.log {
daily
compress
+ sharedscripts
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
+ # 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 2>/dev/null || :
+ done
+ fi
endscript
}
-# Copyright (C) 2009, 2010, 2011, 2012 Nicira, Inc.
+# Copyright (C) 2009, 2010, 2011, 2012, 2017 Nicira, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# without warranty of any kind.
/var/log/openvswitch/*.log {
- daily
- compress
- sharedscripts
- missingok
- postrotate
+ daily
+ compress
+ sharedscripts
+ missingok
+ postrotate
# Tell Open vSwitch daemons to reopen their log files
- for pidfile in `cd /var/run/openvswitch && echo *.pid`; do
- ovs-appctl -t "${pidfile%%.pid}" vlog/reopen
- done
- endscript
+ if [ -d /var/run/openvswitch ]; then
+ for pidfile in `cd /var/run/openvswitch && echo *.pid`; do
+ ovs-appctl -t "${pidfile%%.pid}" vlog/reopen 2>/dev/null || :
+ done
+ fi
+ endscript
}