Commit de943a1a authored by QA-甘 盛聪's avatar QA-甘 盛聪

update

parent eeb4b41a
...@@ -4,13 +4,10 @@ pwd_path="/home/qa-deploy-utils/qa_shell_script" ...@@ -4,13 +4,10 @@ pwd_path="/home/qa-deploy-utils/qa_shell_script"
config_server="$pwd_path/config_server" config_server="$pwd_path/config_server"
project_path=`cat $config_server/project_path.sh` project_path=`cat $config_server/project_path.sh`
function startJavaProject() function startProject()
{ {
sh $config_server/show_info.sh $project 重新启动 $desc sh $config_server/show_info.sh $project 重新启动 $desc
cd $project_path/$project cd $project_path/$project
for file in `ls $project_path/$project`
do
if [[ -f $file ]] && [[ $file = "${project}.jar" ]];then
P_UUID=`ps -ef|grep ${project}.jar |grep -v 'grep'|awk '{print $2}'` P_UUID=`ps -ef|grep ${project}.jar |grep -v 'grep'|awk '{print $2}'`
if [ -n "${P_UUID}" ];then if [ -n "${P_UUID}" ];then
echo "KILL $project PPID=${P_UUID}" echo "KILL $project PPID=${P_UUID}"
...@@ -23,14 +20,7 @@ function startJavaProject() ...@@ -23,14 +20,7 @@ function startJavaProject()
else else
echo `java -Xmx512m -XX:PermSize64m -Xloggc:/tmp/${project}.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -jar ${project}.jar --worker 1 --currentWorker 1 -t > /dev/null 2>&1 &` echo `java -Xmx512m -XX:PermSize64m -Xloggc:/tmp/${project}.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -jar ${project}.jar --worker 1 --currentWorker 1 -t > /dev/null 2>&1 &`
fi fi
elif [[ -f $file ]] && [[ $file != "${project}.jar" ]];then
continue
else
echo "${project}.jar不存在,重启失败"
exit -1
fi
done
} }
startJavaProject $project startProject $project
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment