1 Star 0 Fork 3

littleboyzhou/jenkins_scripts

forked from SmallSaaS/jenkins_scripts 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
java_shell.sh 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
vincent 提交于 2022-06-23 06:58 . add java_shell.sh.
#!/bin/bash
#JAVA_HOME=/usr/local/jdk1.8.0_152
#PATH=$JAVA_HOME/bin:$PATH
#export PATH
cd `dirname $0`
app_name=jad-book-gate
jar_name=${app_name}-1.0.1-RELEASE.jar
log_file=${app_name}-out.log
env=dev
process=${app_name}
pid=$(ps -ef | grep $process | grep 'java' | grep -v grep | awk '{print $2}')
if [ -n "$pid" ]; then
echo "begin to stop app:$process , pid:$pid"
kill -9 $pid
echo "stop app:$process , pid:$pid"
else
echo "app:$process is stopped"
fi
echo 'begin to start app:'$process
nohup java -jar -server -Xmx256m -Xms128m -Xmn64m -XX:PermSize=64m -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Djava.io.tmpdir=../tmpdir -Dspring.config.location=../config/application.properties -Denv=dev -Dlog4j2.formatMsgNoLookups=true ../${jar_name} > ../out/${log_file} 2>&1 &
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/littleboyzhou/jenkins_scripts.git
git@gitee.com:littleboyzhou/jenkins_scripts.git
littleboyzhou
jenkins_scripts
jenkins_scripts
master

搜索帮助