restart.sh脚本模板

#!/bin/bash

cd /data/openapi

tmp2=`ps -ef |grep old |awk '{print $2}'|xargs kill -9`
sleep 10;
apimps=`ps gaux | grep old  |grep -v grep |awk '{print $2}'`

if [ "$apim" == "" ] || [ $apim -ge 0 ];then
        tmp2=`ps -ef | grep old  |awk '{print $2}'|xargs kill -9`
        sleep 10;
        echo "---> Start the openapi."
        nohup java -jar old -0.0.2-SNAPSHOT.jar > nohup.out 2>&1 &
else
        echo "---> Start the openapi ."
        nohup java -jar old -0.0.2-SNAPSHOT.jar > nohup.out 2>&1 &
fi

posted @   钱塘江畔  阅读(32)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示