This probably only makes a difference in the case where you have vswitch
installed but (deliberately) not running _and_ you happen to have ovs-* logs big
enough to be worth rotating. Very much an edge case.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
missingok
postrotate
# Tell Open vSwitch daemons to reopen their log files
- /usr/bin/ovs-appctl -t ovs-vswitchd vlog/reopen
- /usr/bin/ovs-appctl -t ovsdb-server vlog/reopen
+ if [ -e /var/run/openvswitch/ovs-vswitchd.pid ]; then
+ /usr/bin/ovs-appctl -t ovs-vswitchd vlog/reopen
+ fi
+ if [ -e /var/run/openvswitch/ovsdb-server.pid ]; then
+ /usr/bin/ovs-appctl -t ovsdb-server vlog/reopen
+ fi
if [ -e /var/run/openvswitch/ovs-brcompatd.pid ]; then
/usr/bin/ovs-appctl -t ovs-brcompatd vlog/reopen
fi