#!/bin/bash test=`/usr/bin/curl -s -o /dev/null -w "%{http_code}" http://localhost | awk {'print $1'}` if [ "$test" == "200" ] || [ "$test" == "302" ] || [ "$test" == "301" ]; then exit "$?" else exit 1 fi