【Linux脚本】Java进程常驻
#!/bin/sh while true do for app_num in $(jps -m|grep EurekaServerApplication|wc -l) do # check service status if [ ${app_num} -lt 1 ];then echo "Process [${app_num}] not be found !" nohup sh /home/eurekaServer/bin/start.sh > /dev/null 2>1 & else echo "Process [${app_num}] has started... nothing to do" fi done sleep 10 done

浙公网安备 33010602011771号