运行脚本

master
pan 4 years ago
parent 7a68b70c60
commit c1401c3429
  1. 16
      run.sh

@ -19,18 +19,4 @@ function run(){
touch $pid.log && chmod +x $pid.log
}
if [ -e *.log ]
then
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 *.log
run
else
echo "kill $pid error"
fi
else
run
fi
killNode run
Loading…
Cancel
Save