master
pan 4 years ago
parent 72057a3915
commit 0501ddf104
  1. 8
      shell/findPortPid
  2. 17
      shell/killNode
  3. 17
      shell/savePid
  4. 25
      shell/updateRisk

@ -1,8 +0,0 @@
#!/bin/sh
if [ $# == 1 ]
then
netstat -antp|grep $1|awk '{c=$7;split(c,d,"/");print match(d[1],/\d+/)?d[1]:-1}'
else
echo port param not found!
fi

@ -1,17 +0,0 @@
#!/bin/sh
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.sh
else
echo "kill $pid error"
fi
else
./run.sh
fi

@ -1,17 +0,0 @@
#!/bin/sh
echo "findPort $1"
while true
do
pid=`findPortPid $1`
if [ -z $pid ]
then
echo "pid not found!!!"
sleep 1s
else
echo "pid is $pid"
touch $pid.log && chmod +x $pid.log
break
fi
done

@ -1,25 +0,0 @@
#!/bin/sh
cd /app
export webclient='RiskCloudMock'
export webServer='RiskCloudFontend'
export PORT=2233
export webClient=https://risk.kirito.cool
export serverPort=5000
export listenAddress=0.0.0.0
export apiServer=https://risk.kirito.cool
function run(){
if [ ! -e $1 ]
then
git clone git@gogs.kirito.cool:panqihua/$1.git
fi
cd $1 && git reset --hard && git pull && yarn && chmod +x run.sh && killNode
}
run $webclient
run $webServer
Loading…
Cancel
Save