#!/bin/bash # info: list web status # options: # # example: v-list-sys-web-status # # This function lists web server status #----------------------------------------------------------# # Variables & Functions # #----------------------------------------------------------# # Argument definition #format=${1-shell} # Includes # shellcheck source=/etc/hestiacp/hestia.conf source /etc/hestiacp/hestia.conf # shellcheck source=/usr/local/hestia/func/main.sh source $HESTIA/func/main.sh # load config file source_conf "$HESTIA/conf/hestia.conf" #----------------------------------------------------------# # Action # #----------------------------------------------------------# # Checking web system if [ -z "$WEB_SYSTEM" ]; then exit fi # Displaying proxy status if [ "$PROXY_SYSTEM" = 'nginx' ]; then echo "

$PROXY_SYSTEM STATUS

" | tr '[:lower:]' '[:upper:]' wget -qO- http://localhost:8084/ echo "


" fi # Displaying web server status echo "

$WEB_SYSTEM STATUS

" | tr '[:lower:]' '[:upper:]' if [ "$WEB_SYSTEM" != 'nginx' ]; then wget -qO- http://localhost:8081/server-status/ \ | egrep -v "html|DOCTYPE|h1>|title|head" else wget -qO- http://localhost:8084/ fi #----------------------------------------------------------# # Hestia # #----------------------------------------------------------# exit