Commit 7950d25b by irul

Update server_info.sh

1 parent 4cffc193
......@@ -137,7 +137,7 @@ if dpkg --get-selections | grep -E '(^|\s)apache2($|\s)' &> /dev/null ; then
SITES_CNT=1
for SITE in $SITES
do
if curl -I -m 10 "$SITE" 2>&1 | grep -w "200\|301" > /dev/null ; then
if curl -I -m 10 "$SITE" 2>&1 | grep -w "200\|301\|302" > /dev/null ; then
echo "[$SITES_CNT] $SITE is up"
else
echo "[$SITES_CNT] $SITE is down"
......@@ -156,7 +156,7 @@ if dpkg --get-selections | grep -E '(^|\s)nginx($|\s)' &> /dev/null ; then
SITES_CNT=1
for SITE in $SITES
do
if curl -I -m 10 "$SITE" 2>&1 | grep -w "200\|301" > /dev/null ; then
if curl -I -m 10 "$SITE" 2>&1 | grep -w "200\|301\|302" > /dev/null ; then
echo "[$SITES_CNT] $SITE is up"
else
echo "[$SITES_CNT] $SITE is down"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!