master
pan 4 years ago
parent e7ee9870bf
commit ae7ad3e8be
  1. 9
      shell/updateRisk

@ -11,14 +11,15 @@ export apiServer=https://risk.kirito.cool
function run(){
isCreate=false
if [ ! -e $1 ]
then
git clone git@gogs.kirito.cool:panqihua/$1.git
isCreate=true
isUpdate=false
else
isUpdate=true
fi
cd $1 && git reset --hard && git pull && yarn && chmod +x run.sh && killNode
if [ isCreate ]
if [ $isUpdate ]
then
url="http://127.0.0.1:3000/finsh?name=$1"
echo "成功回调地址:$url"
@ -27,7 +28,7 @@ function run(){
}
#检查是否正在部署
command ="ps -ef|grep "updateRisk $1"|awk 'NR>1{next}{print $1}'"
command ="ps -ef|grep 'updateRisk $1'|awk 'NR>1{next}{print $1}'"
echo $command
result=${command}
echo $result

Loading…
Cancel
Save