1 Star 0 Fork 112

开源中国第一白金会员/wind-im

forked from WindChat/wind-im 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
start.sh 953 Bytes
一键复制 编辑 原始数据 按行查看 历史
SAM2O2O 提交于 2019-11-27 23:46 . update start.sh stop.sh
#!/bin/bash
PORT=$1
PORT2=$2
IS_RESTART=$3
##set tcp port
if [ -n $PORT ]; then
PORT=2021
fi
##set http port
if [ -n $PORT2 ]; then
PORT2=8280
fi
#### echo server is starting
echo "[OK] WindChat is starting [tcp-port:"$PORT" http-port:"$PORT2"]"
JAVA_JAR="windchat-server"
PID=$(ps -ef|grep $JAVA_JAR|grep $PORT |head -1| awk '{printf $2}')
###if server is running, exit and echo error
if [ $PID > 0 ]; then
echo "[ERROR] WindChat is running [PID:"$PID"]"
echo "[ERROR] WindChat start failure"
echo ""
exit
fi
java -Dsite.port=$PORT -Dhttp.port=$PORT2 -jar $JAVA_JAR.jar >>stdout.log 2>&1 &
PID=$(ps -ef|grep $JAVA_JAR|grep $PORT |head -1| awk '{printf $2}')
if [ $? -eq 0 ]; then
echo "[OK] WindChat tcp-port:"$PORT",http-port:$PORT2,PID:$PID"
echo "[OK] WindChat is started successfully [PID:"$PID"]"
else
echo "[ERROR] WindChat is started failed"
echo "exit..."
echo ""
exit
fi
echo ""
echo ""
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/liaoshaojun/wind-im.git
git@gitee.com:liaoshaojun/wind-im.git
liaoshaojun
wind-im
wind-im
master

搜索帮助