4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 export CURRENT_DIR=$(pwd)
19 RESULT=`ps -aux | grep $SERVICE | grep -v grep`
20 OVS_PMD_STAT_SCRIPT=$CURRENT_DIR/../../3rd_party/ovs_pmd_stats/ovs_pmd_stats.py
21 PATH_LOCAL=/usr/local/src/
23 if [ "${RESULT:-null}" != null ]; then
24 echo "Openvswitch service is running."
25 sudo ovs-vsctl set-manager ptcp:6640
26 cp $OVS_PMD_STAT_SCRIPT $PATH_LOCAL
28 echo "Openvswitch service is not running. Please start before running ovs plugins"
30 # Always copy python ovs module when building Docker image
31 if [ -z ${DOCKER+x} ]; then
32 cp $OVS_PMD_STAT_SCRIPT $PATH_LOCAL