#!/bin/bash

# 引入全局文件
source $(pwd)/bin/global.sh

cwd=$1
moduleID=$2
env=$3

#检查本地的进程
exist=`ps aux | grep -w $moduleID | grep -v grep |  grep -v bash | awk '{print $2}'`
if [ ! $exist ];then
    if [ $moduleID = 800001 ];then
        cd ${cwd}
        login/${GLOBAL_SERVICE_NAME_PREFIX}login -i 800001 -e ${env} &
    elif [ $moduleID = 900001 ];then
        cd ${cwd}
        gm/${GLOBAL_SERVICE_NAME_PREFIX}gm -i 900001 -e ${env} &
    elif [ $moduleID = 100001 ];then
        cd ${cwd}
        central/${GLOBAL_SERVICE_NAME_PREFIX}central -i 100001 -e ${env} -m a
    fi 
fi



 