This commit is contained in:
aozhiwei 2020-09-18 12:07:49 +08:00
parent c56c6427da
commit a9e333e909

View File

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