2021-10-29 09:47:48 +00:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
if [ ! -d "log/" ]; then
|
|
|
|
|
mkdir "log"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
bash ./cmstop.sh
|
|
|
|
|
|
|
|
|
|
time=$(date "+%Y_%m_%d_%H:%M:%S")
|
|
|
|
|
|
|
|
|
|
if [ -f "./log/cm.log" ]; then
|
|
|
|
|
echo "move log ./log/cm_${time}.log"
|
|
|
|
|
mv ./log/cm.log "./log/cm_${time}.log"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f "./log/cm.err" ]; then
|
|
|
|
|
mv ./log/cm.err "./log/cm_${time}.err"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# ps -ef | grep java | grep bdserver | grep CM | awk '{print $2}' | xargs kill -9
|
|
|
|
|
|
2022-05-05 05:28:28 +00:00
|
|
|
|
java -Dfile.encoding=UTF-8 -Djava.library.path="./dynamicLibrary" -Dlog4j.configurationFile=./log4j2.properties -cp "./libs/*:bdagent.jar" org.bdware.server.CMHttpServer 1>/dev/null 2>/dev/null &
|
2021-10-29 09:47:48 +00:00
|
|
|
|
#-Xmx3550m -Xms3550m -Xmn2g
|
|
|
|
|
#-XX:+UseConcMarkSweepGC -XX:CMSFullGCsBeforeCompaction=5
|
|
|
|
|
# 以下可启用https/wss,其中,./ssl/xxx.pfx为ssl证书的路径,:后面的123456是密码。
|
|
|
|
|
# java -Dfile.encoding=UTF-8 -cp "./libs/*:bdagent.jar" org.bdware.server.CMHttpServer -service-port=8080 -enable-ssl=./ssl/xxx.pfx:123456 -do-repo-ip=127.0.0.1 -do-repo-port=18099 1 > ./log/cm.log 2> ./log/cm.err &
|
|
|
|
|
echo $! >./PID
|