2 # Copyright 2017-2019 Intel Corporation and OPNFV. All rights reserved.
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.
17 export CURRENT_DIR=$(pwd)
20 RESULT=`ps -aux | grep $SERVICE | grep -v grep`
21 OVS_PMD_STAT_SCRIPT=$CURRENT_DIR/../../3rd_party/ovs_pmd_stats/ovs_pmd_stats.py
22 PATH_LOCAL=/usr/local/src/
24 if [ "${RESULT:-null}" != null ]; then
25 echo "Openvswitch service is running."
26 sudo ovs-vsctl set-manager ptcp:6640
27 cp $OVS_PMD_STAT_SCRIPT $PATH_LOCAL
29 echo "Openvswitch service is not running. Please start before running ovs plugins"
31 # Always copy python ovs module when building Docker image
32 if [ -z ${DOCKER+x} ]; then
33 cp $OVS_PMD_STAT_SCRIPT $PATH_LOCAL