You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
riskshell/shell/killNode

21 lines
267 B

#!/bin/sh
#杀死进程
result=1
if [ -e run.pid ]
then
p=`cat run.pid`
kill $p
if [ $? -eq 0 ]
then
echo "成功杀死进程:$p"
rm -f run.pid
else
echo "无法杀死进程:$p"
result=0
fi
fi
if [ $result -eq 1 ]
then
./run.sh
fi