mirror of
https://gitee.com/BDWare/agent-backend
synced 2025-01-10 01:44:14 +00:00
27 lines
960 B
Bash
27 lines
960 B
Bash
|
#!/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
|
|||
|
|
|||
|
java -Dfile.encoding=UTF-8 -Djava.library.path="./dynamicLibrary" -cp "./libs/*:bdagent.jar" org.bdware.server.CMHttpServer 1>./log/cm.log 2>./log/cm.err &
|
|||
|
#-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
|