aozhiwei de0cdc28b4 1
2020-10-27 17:57:17 +08:00

18 lines
277 B
Bash
Executable File

#!/bin/bash
source ./common.sh
pid=$(ps -ef|grep "${EXE_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
nohup ./${EXE_NAME} -n $2 -i $1 >> ${EXE_NAME}$2_$1.out &
echo 'success'