Commit dbd2750c by irul

Menambahkan timeout saat pengecekan site

1 parent e4fa90a3
...@@ -119,7 +119,7 @@ if dpkg --get-selections | grep -E '(^|\s)apache2($|\s)' &> /dev/null ; then ...@@ -119,7 +119,7 @@ if dpkg --get-selections | grep -E '(^|\s)apache2($|\s)' &> /dev/null ; then
SITES_CNT=1 SITES_CNT=1
for SITE in $SITES for SITE in $SITES
do do
if curl -I "$SITE" 2>&1 | grep -w "200\|301" > /dev/null ; then if curl -I -m 10 "$SITE" 2>&1 | grep -w "200\|301" > /dev/null ; then
echo "$SITES_CNT $SITE is up" echo "$SITES_CNT $SITE is up"
else else
echo "$SITES_CNT $SITE is down" echo "$SITES_CNT $SITE is down"
...@@ -138,7 +138,7 @@ if dpkg --get-selections | grep -E '(^|\s)nginx($|\s)' &> /dev/null ; then ...@@ -138,7 +138,7 @@ if dpkg --get-selections | grep -E '(^|\s)nginx($|\s)' &> /dev/null ; then
SITES_CNT=1 SITES_CNT=1
for SITE in $SITES for SITE in $SITES
do do
if curl -I "$SITE" 2>&1 | grep -w "200\|301" > /dev/null ; then if curl -I -m 10 "$SITE" 2>&1 | grep -w "200\|301" > /dev/null ; then
echo "$SITES_CNT $SITE is up" echo "$SITES_CNT $SITE is up"
else else
echo "$SITES_CNT $SITE is down" 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!