1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 23:08:07 +00:00

add php version and processor check functions

This commit is contained in:
Jacob Salmela 2017-05-22 08:48:56 -05:00
parent daff5d8b5a
commit 8c5c1316dd
No known key found for this signature in database
GPG Key ID: 1962FF1A5046135E

View File

@ -165,10 +165,22 @@ check_resolver_version() {
fi
}
check_php_version() {
PHP_VERSION=$(php -v |& head -n1 | cut -d '-' -f1 | cut -d ' ' -f2)
echo -e " ${INFO} PHP"
if [[ -z "${PHP_VERSION}" ]]; then
echo -e " ${CROSS} PHP version could not be detected."
else
echo -e " ${TICK} ${PHP_VERSION}"
fi
}
check_critical_dependencies() {
echo_current_diagnostic "Versions of critical dependencies"
check_web_server_version
check_web_server_version
check_php_version
}
get_distro_attributes() {
@ -212,6 +224,16 @@ diagnose_operating_system() {
${INFO} ${COL_LIGHT_RED}Please see${COL_NC}: ${COL_CYAN}${faq_url}${COL_NC}"
}
processor_check() {
echo_current_diagnostic "Processor"
PROCESSOR=$(uname -m)
if [[ -z "${PROCESSOR}" ]]; then
echo -e " ${CROSS} Processor could not be identified."
else
echo -e " ${INFO} ${PROCESSOR}"
fi
}
parse_file() {
# Set the first argument passed to tihs function as a named variable for better readability
local filename="${1}"
@ -295,6 +317,7 @@ check_core_version
check_web_version
check_ftl_version
diagnose_operating_system
processor_check
check_critical_dependencies
diagnose_setup_variables
check_dnsmasq_d