#!/bin/bash

cwd=`pwd`

# 清空日志
echo $cwd
module=$1

function stopserver()
{
    echo "Begin stop module $1..."
    for i in `ps -ef | grep -w $1/$1 | grep -v grep | awk '{print $2}'`
    do
        echo "$1 process $i"
        echo "kill -${2} $i"
        kill -${2} $i
    done

    # 杀死进程
     pkill -${2} -f "${1}/.*${1}"

    echo "Stop module $1 End"
}

stopserver login 9
sleep 2
 
