This commit is contained in:
aozhiwei 2020-08-21 18:03:07 +08:00
parent 72bfc3bd73
commit 8aa1eb88e7

View File

@ -3,7 +3,8 @@
source /etc/profile
source /root/.bash_profile
pid=`ps -ef|grep 'gameserver2004 -n 1 -i 1'|grep -v grep|awk '{print $2}'`
echo "gameserver2004 -n $2 -i $1"
pid=$(ps -ef|grep "gameserver2004 -n $2 -i $1"|grep -v grep|awk '{print $2}')
echo $pid
if [[ $pid != "" ]]
@ -13,4 +14,4 @@ else
echo "pid 为空"
fi
nohup ./gameserver2004 -n $1 -i $2 >> gameserver2004$2_$1.out &
nohup ./gameserver2004 -n $2 -i $1 >> gameserver2004$2_$1.out &