首页 > 编程语言 > 详细

linux脚本启动jar

时间:2021-08-18 15:36:50      阅读:41      评论:0      收藏:0      [点我收藏+]

启动

 

#!/bin/bash
#iam_address=172.30.162.45:8002

nohup ${HCS_OW_HOME}/jre/bin/java -jar ${HCS_OW_HOME}/service/hcs-online-ow-service.jar \
--server.port=8012 \
--spring.datasource.driver-class-name=com.huawei.gauss.jdbc.inner.GaussDriver \
--spring.datasource.username=moprivatecloudservicedb \
--spring.datasource.password=Changeme_123 \
--spring.datasource.url=jdbc:zenith:@127.0.0.1:6001 \
--spring.redis.database=2 \
--spring.redis.host=127.0.0.1 \
--spring.redis.port=6379 \
--spring.redis.password=huawei@1234 \
--spring.redis.jedis.pool.max-active=200 \
--spring.redis.jedis.pool.max-wait=-1 \
--spring.redis.jedis.pool.max-idle=10 \
--spring.redis.jedis.pool.min-idle=5 \
--spring.redis.timeout=1000 \
--vdc_admin=vdc_admin \
--vdc_admin_pwd=Huawei@123 \
--bss_admin=liyajun \
--bss_admin_pwd=huawei12#$ \
--iam_address=172.30.162.45:8003 \
--ldapid=65d5a253-35f8-48a6-82cf-0186cbe366ca \
--tmp_path=/opt/hcsow/static-resource/tmp \
--upload_path=/opt/hcsow/static-resource \
--default_font=方正兰亭黑简体 \
--fonts=宋体,微软雅黑,黑体,仿宋,方正兰亭黑简体,Calibri,Arial \
--convert_url=http://10.29.200.251:8888/convert \
--server_host=https://127.0.0.1:8012 \
>/dev/null &

echo hcs-online-ow-service is started

 

停止

#!/bin/bash

PID=$(ps -ef | grep ${HCS_OW_HOME}/service/hcs-online-ow-service.jar | grep -v grep | awk ‘{ print $2 }‘)
if [ -z "$PID" ]; then
  echo hcs-online-ow-service is already stopped
else
  kill -9 $PID
  echo hcs-online-ow-service is stopped
fi

 

总脚本

#!/bin/bash

source ${HCS_OW_HOME}/bin/portal-service-stop.sh

source ${HCS_OW_HOME}/bin/portal-service-start.sh

 

linux脚本启动jar

原文:https://www.cnblogs.com/chengshentao/p/15156045.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!