17 lines
298 B
Bash
Executable File
17 lines
298 B
Bash
Executable File
#!/bin/bash
|
|
|
|
source /etc/profile
|
|
source /root/.bash_profile
|
|
|
|
pid=$(ps -ef|grep "gameserver2005 -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 ./gameserver2005 -n $2 -i $1 >> gameserver2005$2_$1.out &
|