OSDN Git Service

8ef4ef66ff0a90fda078849c29aa2b738aa53c1f
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / common / stop_um_ps.sh
1 #!/bin/bash
2
3 LOG "stop_um_ps start."
4
5 if [ -n "`pgrep l7vsd`" ]
6 then
7         ${INIT_L7VSD} stop > /dev/null 2>&1
8         if [ $? -ne 0 ]
9         then
10                 LOG_FATAL "Can not stop l7vsd."
11                 exit 1
12         fi
13 fi
14
15 if [ -n "`pgrep l7directord`" ]
16 then
17         ${INIT_L7DIRECTORD} stop > /dev/null 2>&1
18         pgrep l7directord | xargs kill -KILL > /dev/null 2>&1
19         usleep 100000
20         if [ -n "`pgrep l7directord`" ]
21         then
22                 LOG_FATAL "Can not stop l7directord."
23                 exit 1
24         fi
25 fi
26
27 LOG "stop_um_ps end."