1 Star 0 Fork 54

hjpck/brcc

forked from 百度开源/brcc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
start.sh 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
ghzengqy568 提交于 2021-04-22 18:01 . fix #30 #33
#!/bin/bash
JAVA_FILE=./brcc-server/target/brcc-server.jar
PID=$(jps -ml | grep "$JAVA_FILE" | awk '{print $1}')
if [ "$PID" != "" ] ; then
echo "will kill the pid $PID"
kill -9 $PID;
fi
sleep 5
# set your web port
# SERVER_PORT=8080
# SET YOUR REDIS ENVIRONMENT
# REDIS_HOST=x.x.x.x
# REDIS_PORT=6379
# REDIS_PASSWORD=xxx
# SET YOUR MYSQL ENVIRONMENT
# DB_HOST=x.x.x.x
# DB_PORT=3306
# DB_USERNAME=xxx
# DB_PASSWORD=xxx
if [ "$SERVER_PORT" != "" ]; then
JAVA_OPT="$JAVA_OPT -Dserver.port=$SERVER_PORT"
fi
if [ "$REDIS_HOST" != "" ]; then
JAVA_OPT="$JAVA_OPT -Dredis.host=$REDIS_HOST"
fi
if [ "$REDIS_PASSWORD" != "" ]; then
JAVA_OPT="$JAVA_OPT -Dspring.redis.password=$REDIS_PASSWORD"
fi
if [ "$REDIS_PORT" != "" ]; then
JAVA_OPT="$JAVA_OPT -Dredis.port=$REDIS_PORT"
fi
if [ "$REDIS_PASSWORD" != "" ]; then
JAVA_OPT="$JAVA_OPT -Dredis.password=$REDIS_PASSWORD"
fi
if [ "$DB_HOST" != "" ]; then
JAVA_OPT="$JAVA_OPT -Ddb.host=$DB_HOST"
fi
if [ "$DB_PORT" != "" ]; then
JAVA_OPT="$JAVA_OPT -Ddb.port=$DB_PORT"
fi
if [ "$DB_USERNAME" != "" ]; then
JAVA_OPT="$JAVA_OPT -Ddb.username=$DB_USERNAME"
fi
if [ "$DB_PASSWORD" != "" ]; then
JAVA_OPT="$JAVA_OPT -Ddb.password=$DB_PASSWORD"
fi
nohup java -jar $JAVA_OPT $JAVA_FILE 1>/dev/null 2>&1 &
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/hjpck/brcc.git
[email protected]:hjpck/brcc.git
hjpck
brcc
brcc
main

搜索帮助