测试环境主机执行脚本
Posted zgqbky
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了测试环境主机执行脚本相关的知识,希望对你有一定的参考价值。
#!/bin/bash
echo $USER
workhome=/lvnktest/dygaelasticsearch-service/
workjar=${workhome}dygaelasticsearch-service.jar
pid=`ps -ef|grep dygaelasticsearch-service.jar|grep -v ‘grep‘ | awk ‘{print $2}‘`
if [ -z $pid ];
then echo "dygaelasticsearch-service is not running, so just to start it..."
else
echo "dygaelasticsearch-service[pid=${pid}] is running, so i should kill the progress and restart it... "
kill -9 $pid
fi
nohup java -jar ${workjar} > ${workhome}spring.log &
exit
以上是关于测试环境主机执行脚本的主要内容,如果未能解决你的问题,请参考以下文章