diff --git a/run.sh b/run.sh index f344496..deff925 100644 --- a/run.sh +++ b/run.sh @@ -9,14 +9,14 @@ function run(){ touch $pid.log && chmod +x $pid.log } -if [ -e *.pid ] +if [ -e *.log ] then - pid=`stat *.pid|awk 'NR>1{next}{c=$0;gsub(/\D/,"",c);print c}'` + pid=`stat *.log|awk 'NR>1{next}{c=$0;gsub(/\D/,"",c);print c}'` kill -9 pid if [ $? -eq 0 ] then echo 'kill $pid success' - rm -f *.pid + rm -f *.log run else echo 'kill $pid error'