summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/htmlize/finish.sh
blob: dc3aa868b69a32a24cd04861cddf0336c6535d6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0

# Stop opnfv-testapi server
proc_number=`ps -ef | grep opnfv-testapi | grep -v grep | wc -l`

if [ $proc_number -gt 0 ]; then
    procs=`ps -ef | grep opnfv-testapi | grep -v grep`
    echo "Kill opnfv-testapi server $procs"
    ps -ef | grep opnfv-testapi | grep -v grep | awk '{print $2}' | xargs kill -kill &>/dev/null
fi