09_监控脚本:保证程序当掉自动重启且惟一

#! /bin/sh #进程名字可修改 PRO_NAME=sbus prossPath=./ while true ; do # 用ps获取$PRO_NAME进程数量 NUM=`ps aux | grep ${PRO_NAME} | grep -v grep |wc -l` # 少于1,重启进程 if [ "${NUM}" -lt "1" ];then e
相关文章
相关标签/搜索