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.
riskcloudmock/run.sh

28 lines
387 B

4 years ago
#!/bin/sh
4 years ago
export PORT=2233
export webClient=http://localhost:5000
4 years ago
4 years ago
function run(){
nohup yarn start &
4 years ago
pid=`findPortPid $PORT`
ech $pid>$pid.log
4 years ago
}
if [ -e *.pid ]
then
pid=`stat *.pid|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
4 years ago
run
4 years ago
else
echo 'kill $pid error'
4 years ago
fi
4 years ago
else
4 years ago
run
4 years ago
fi