1 Star 0 Fork 0

WeBankOpenSource/WeBASE-Front

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
status.sh 1.10 KB
Copy Edit Raw Blame History
CodingCattwo authored 2020-04-08 15:02 +08:00 . fix code style
#!/bin/bash
APP_MAIN=com.webank.webase.front.Application
CURRENT_DIR=$(pwd)/
CONF_DIR=${CURRENT_DIR}conf
SERVER_PORT=$(cat $CONF_DIR/application.yml | grep "server:" -A 3 | grep "port" | awk '{print $2}'| sed 's/\r//')
if [ ${SERVER_PORT}"" = "" ];then
echo "$CONF_DIR/application.yml server port has not been configured"
exit -1
fi
processPid=0
checkProcess(){
server_pid=$(ps aux | grep java | grep $CURRENT_DIR | grep $APP_MAIN | awk '{print $2}')
if [ -n "$server_pid" ]; then
processPid=$server_pid
else
processPid=0
fi
}
status(){
checkProcess
echo "==============================================================================================="
if [ $processPid -ne 0 ]; then
echo "Server $APP_MAIN Port $SERVER_PORT is running PID($processPid)"
echo "==============================================================================================="
else
echo "Server $APP_MAIN Port $SERVER_PORT is not running"
echo "==============================================================================================="
fi
}
status
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/WeBankOS/WeBASE-Front.git
git@gitee.com:WeBankOS/WeBASE-Front.git
WeBankOS
WeBASE-Front
WeBASE-Front
master

Search