mirror of
https://gitee.com/BDWare/router-backend
synced 2025-01-10 18:04:05 +00:00
29 lines
1.0 KiB
Bash
29 lines
1.0 KiB
Bash
#!/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:
|
||
|
||
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 &
|
||
|
||
#以下可启用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
|