get_apache2_info.sh: add apache version.
This commit is contained in:
parent
9cec92749c
commit
deb8e5c496
@ -242,6 +242,15 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echononl "Determin Apache2 version number.."
|
||||||
|
APACHE_VERSION="$(trim $($HTTPD_COMMAND -v | head -1 | cut -d ":" -f2))"
|
||||||
|
if [[ $? -gt 0 ]]; then
|
||||||
|
echo_failed
|
||||||
|
else
|
||||||
|
echo_done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echononl "Determin ServerRoot Directory.."
|
echononl "Determin ServerRoot Directory.."
|
||||||
APACHE_SERVER_ROOT="$($_httpd_binary -t -D DUMP_RUN_CFG | grep ServerRoot | awk '{print$2}' | tr -d '"')"
|
APACHE_SERVER_ROOT="$($_httpd_binary -t -D DUMP_RUN_CFG | grep ServerRoot | awk '{print$2}' | tr -d '"')"
|
||||||
if [[ $? -gt 0 ]]; then
|
if [[ $? -gt 0 ]]; then
|
||||||
@ -264,12 +273,16 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echononl "Determin Apache2 version number.."
|
echononl "Determin VHost directory.."
|
||||||
APACHE_VERSION="$(trim $($HTTPD_COMMAND -v | head -1 | cut -d ":" -f2))"
|
if [[ -d "${APACHE_SERVER_ROOT}/sites-enabled" ]]; then
|
||||||
if [[ $? -gt 0 ]]; then
|
APACHE_VHOST_DIR="${APACHE_SERVER_ROOT}/sites-enabled"
|
||||||
echo_failed
|
elif [[ -d "${APACHE_SERVER_ROOT}/conf/vhosts" ]]; then
|
||||||
else
|
APACHE_VHOST_DIR="${APACHE_SERVER_ROOT}/conf/vhosts"
|
||||||
|
fi
|
||||||
|
if [[ -n "${APACHE_VHOST_DIR}" ]] ; then
|
||||||
echo_done
|
echo_done
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -279,36 +292,42 @@ if $terminal ; then
|
|||||||
echo -e "\033[4G\033[33m\033[1mApache2 Info:\033[m"
|
echo -e "\033[4G\033[33m\033[1mApache2 Info:\033[m"
|
||||||
echo -e "\033[4G\033[33m\033[1m=============\033[m"
|
echo -e "\033[4G\033[33m\033[1m=============\033[m"
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
|
||||||
|
|
||||||
|
if [[ -n $APACHE_VERSION ]]; then
|
||||||
if [[ -n $APACHE_VERSION ]]; then
|
|
||||||
echo -e "\033[4GApache2 version..................: $APACHE_VERSION"
|
echo -e "\033[4GApache2 version..................: $APACHE_VERSION"
|
||||||
else
|
else
|
||||||
echo -e "\033[4GApache2 version..................: \033[33m-- could not be determined --\033[m"
|
echo -e "\033[4GApache2 version..................: \033[33m-- could not be determined --\033[m"
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
if [[ -x "$HTTPD_COMMAND" ]] ; then
|
if [[ -n "$APACHE_SERVER_ROOT" ]] ; then
|
||||||
echo -e "\033[4GApache2 daemon ..................: $HTTPD_COMMAND"
|
|
||||||
else
|
|
||||||
echo -e "\033[4GApache2 daemon ..................: \033[33m-- could not be determined --\033[m"
|
|
||||||
fi
|
|
||||||
echo ""
|
|
||||||
if [[ -n "$APACHE_SERVER_ROOT" ]] ; then
|
|
||||||
echo -e "\033[4GServer Root Directory............: $APACHE_SERVER_ROOT"
|
echo -e "\033[4GServer Root Directory............: $APACHE_SERVER_ROOT"
|
||||||
else
|
else
|
||||||
echo "\033[4GServer Root Directory............: \033[33m-- could not be determined --\033[m"
|
echo "\033[4GServer Root Directory............: \033[33m-- could not be determined --\033[m"
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
if [[ -n "$HTTP_USER" ]] ; then
|
if [[ -x "$HTTPD_COMMAND" ]] ; then
|
||||||
|
echo -e "\033[4GApache2 daemon ..................: $HTTPD_COMMAND"
|
||||||
|
else
|
||||||
|
echo -e "\033[4GApache2 daemon ..................: \033[33m-- could not be determined --\033[m"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
if [[ -n "${APACHE_VHOST_DIR}" ]] ; then
|
||||||
|
echo -e "\033[4GApache2 VHost directory..........: $APACHE_VHOST_DIR"
|
||||||
|
else
|
||||||
|
echo -e "\033[4GApache2 VHost directory..........: \033[33m-- could not be determined --\033[m"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
if [[ -n "$HTTP_USER" ]] ; then
|
||||||
echo -e "\033[4GApache2 User.....................: $HTTP_USER"
|
echo -e "\033[4GApache2 User.....................: $HTTP_USER"
|
||||||
else
|
else
|
||||||
echo -e "\033[4GApache2 User.....................: \033[33m-- could not be determined --\033[m"
|
echo -e "\033[4GApache2 User.....................: \033[33m-- could not be determined --\033[m"
|
||||||
fi
|
fi
|
||||||
if [[ -n "$HTTP_GROUP" ]] ; then
|
if [[ -n "$HTTP_GROUP" ]] ; then
|
||||||
echo -e "\033[4GApache2 Group....................: $HTTP_GROUP"
|
echo -e "\033[4GApache2 Group....................: $HTTP_GROUP"
|
||||||
else
|
else
|
||||||
echo -e "\033[4GApache2 Group....................: \033[33m-- could not be determined --\033[m"
|
echo -e "\033[4GApache2 Group....................: \033[33m-- could not be determined --\033[m"
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user