diff --git a/heartbeat/nginx b/heartbeat/nginx index cb1c6ec27..0f856175d 100755 --- a/heartbeat/nginx +++ b/heartbeat/nginx @@ -251,7 +251,7 @@ nginxcat() { close(cmd); } function listfiles(pattern, cmd,f) { - cmd="ls "pattern" 2>/dev/null"; + cmd="ls "pattern; while( ( cmd | getline f ) > 0 ) { printfile(f); } @@ -271,7 +271,7 @@ nginxcat() { return !system("test -d \""s"\""); } { procline(); } - ' $1 | + ' $1 2> /dev/null | sed 's/#.*//;s/[[:blank:]]*$//;s/^[[:blank:]]*//' | grep -v '^$' } @@ -800,8 +800,8 @@ Extra options to apply when starting nginx. - - + + @@ -847,11 +847,11 @@ validate_all_nginx() { exit $OCF_ERR_CONFIGURED fi if - ocf_run $NGINXD $OPTIONS -t -c $CONFIGFILE + ocf_run $NGINXD $OPTIONS -q -t -c $CONFIGFILE then : Cool $NGINXD likes $CONFIGFILE else - ocf_exit_reason "$NGINXD $OPTIONS -t -c $CONFIGFILE reported a configuration error." + ocf_exit_reason "$NGINXD $OPTIONS -q -t -c $CONFIGFILE reported a configuration error." return $OCF_ERR_CONFIGURED fi return $OCF_SUCCESS @@ -908,7 +908,7 @@ then if [ ! -z "$OCF_RESKEY_httpd" ] then - ocf_log info "Using $NGINXD as nginx" + ocf_log debug "Using $NGINXD as nginx" fi fi