Commit 58f59012 authored by 智勇's avatar 智勇

grep -E

parent fc84b33a
......@@ -31,9 +31,8 @@ function ack()
for ((i=0;;))
do
#首先查询是否有启动失败的报错日志
fail_flag=`cat ${log_path} |grep "Application startup failed" | wc -l`
fail_flag2=`cat ${log_path} |grep "APPLICATION FAILED TO START" | wc -l`
if [ "${fail_flag}" = 1 ] || [ "${fail_flag2}" = 1 ];then
fail_flag=`grep -E "APPLICATION FAILED TO START|Application startup failed" ${log_path} | wc -l`
if [ "${fail_flag}" = 1 ];then
echo "server $ip $project startup failed in ${wait_ack_time} seconds..."
num=`grep -n "\[ERROR\]" $log_path | head -1 |cut -d ":" -f 1`
if [ -n "$num" ];then
......
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