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

grep -E

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