parent
08179e6358
commit
b0f4a5e583
@ -0,0 +1,10 @@ |
||||
#!/bin/sh |
||||
# 检查端口是否存在 |
||||
|
||||
source riskenv |
||||
if [[ `findPortPid $PORT|wc -l` -eq 1 && `findPortPid $serverPort|wc -l` -eq 1 ]] |
||||
then |
||||
echo 0 |
||||
else |
||||
echo 1 |
||||
fi |
@ -1,8 +1,6 @@ |
||||
#!/bin/sh |
||||
# 查找端口pid |
||||
if [ $# == 1 ] |
||||
if [[ $# == 1 && `netstat -antp|grep $1|wc -l` -eq 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! |
||||
netstat -anp|grep $1|awk '{printf $7}'|cut -d/ -f1 |
||||
fi |
||||
|
@ -0,0 +1,14 @@ |
||||
#!/bin/sh |
||||
# 设置环境变量 |
||||
|
||||
#服务端端口 |
||||
export PORT=2233 |
||||
#客户端访问地址 |
||||
export webClient=https://risk.kirito.cool |
||||
#客户端端口 |
||||
export serverPort=5000 |
||||
#客户端监听地址 |
||||
export listenAddress=0.0.0.0 |
||||
#服务端访问地址 |
||||
export apiServer=https://risk.kirito.cool |
||||
|
Loading…
Reference in new issue