kolla/docker/openvswitch/openvswitch-base/ovs_wrapper.sh

20 lines
275 B
Bash

#!/usr/bin/env bash
catch_term() {
ovs-appctl -T1 -t /run/openvswitch/$1.$child.ctl exit
exit 0
}
catch_quit() {
ovs-appctl -T1 -t /run/openvswitch/$1.$child.ctl exit
exit 0
}
trap catch_term SIGTERM
trap catch_quit SIGQUIT
"$@" &
child=$!
wait "$child"