進程守護腳本, 如果已運行則不運行
processExist=`ps aux|grep processName|grep -v "grep" ` // 注意這是Esc下面那個`
if [ -z "$processExist" ];then
exec processName
else
echo "process is running"
fi
if [ -z "$processExist" ];then
exec processName
else
echo "process is running"
fi
posted on 2013-07-06 15:36 多彩人生 閱讀(317) 評論(0) 編輯 收藏 引用 所屬分類: linux program

