#!/bin/bash

source ./common.sh

export GOTRACEBACK=crash

pid=$(ps -ef|grep "${PROJECT_NAME} -n $2 -i $1"|grep -v grep|awk '{print $2}')
echo $pid

if [[ $pid != "" ]]
then
    echo $pid|xargs kill -9
else
    echo "pid 为空"
fi

cd bin
nohup ./${PROJECT_NAME} -n $2 -i $1 >> ${PROJECT_NAME}$2_$1.out &

echo 'success'
