This commit is contained in:
aozhiwei 2020-08-21 16:57:35 +08:00
parent 47e2112319
commit 9a5d7b7ae2

16
server/bin/restart.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
source /etc/profile
source /root/.bash_profile
pid=`ps -ef|grep 'gameserver2004 -n 1 -i 1'|grep -v grep|awk '{print $2}'`
echo $pid
if [[ $pid != "" ]]
then
echo $pid|xargs kill -9
else
echo "pid 为空"
fi
nohup ./gameserver2004 -n $1 -i $2 >> gameserver2004$2_$1.out &