router-backend/script/ncstart.sh

29 lines
1.0 KiB
Bash
Raw Normal View History

2021-10-29 09:47:47 +00:00
#!/bin/bash
if [ ! -d "log/" ]; then
mkdir "log"
fi
bash ./ncstop.sh
time=$(date "+%Y_%m_%d_%H:%M:%S")
if [ -f "./log/nc.log" ]; then
echo "move log ./log/nc_${time}.log"
mv ./log/nc.log "./log/nc_${time}.log"
fi
if [ -f "./log/nc.err" ]; then
mv ./log/nc.err "./log/nc_${time}.err"
fi
# ps -ef | grep java | grep bdserver | grep NodeCenterServer | awk '{print $2}' |xargs kill -9
# ps -ef | grep java | grep bdcluster | grep NodeCenterServer | awk '{print $2}' |xargs kill -9
#-Dlog4j.configuration=file:
2022-05-05 05:28:26 +00:00
java -Dfile.encoding=UTF-8 -Dlog4j.configurationFile=./log4j2.properties -cp "./libs/*:bdcluster.jar" org.bdware.server.NodeCenterServer 1 >./log/nc.log 2>./log/nc.err &
2021-10-29 09:47:47 +00:00
#以下可启用https/wss其中./ssl/xxx.pfx为ssl证书的路径:后面的123456是密码。
#java -Dfile.encoding=UTF-8 -cp "./libs/*:bdcluster.jar" org.bdware.server.NodeCenterServer -service-port=18002 -enable-ssl=./ssl/xxx.pfx:123456 -do-repo-ip=127.0.0.1 -do-repo-port=18098 1 > ./log/cm.log 2> ./log/cm.err &
echo $! >./PID