timeout 10 sec for apache2 status

This commit is contained in:
myvesta 2020-05-10 18:58:16 +02:00 committed by GitHub
parent 9525acdd7f
commit 060dfee2bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,17 +28,17 @@ fi
# Displaying proxy status # Displaying proxy status
if [ "$PROXY_SYSTEM" = 'nginx' ]; then if [ "$PROXY_SYSTEM" = 'nginx' ]; then
echo "<h2>$PROXY_SYSTEM STATUS</h2>"| tr '[:lower:]' '[:upper:]' echo "<h2>$PROXY_SYSTEM STATUS</h2>"| tr '[:lower:]' '[:upper:]'
curl -fsSL --max-time 3 http://localhost:8084/ curl -fsSL --max-time 10 http://localhost:8084/
echo "<br><br><br>" echo "<br><br><br>"
fi fi
# Displaying web server status # Displaying web server status
echo "<h2>$WEB_SYSTEM STATUS</h2>"| tr '[:lower:]' '[:upper:]' echo "<h2>$WEB_SYSTEM STATUS</h2>"| tr '[:lower:]' '[:upper:]'
if [ "$WEB_SYSTEM" != 'nginx' ]; then if [ "$WEB_SYSTEM" != 'nginx' ]; then
curl -fsSL --max-time 3 http://localhost:8081/server-status/ |\ curl -fsSL --max-time 10 http://localhost:8081/server-status/ |\
egrep -v "html|DOCTYPE|h1>|title|head" egrep -v "html|DOCTYPE|h1>|title|head"
else else
curl -fsSL --max-time 3 http://localhost:8084/ curl -fsSL --max-time 10 http://localhost:8084/
fi fi