add php version and processor check functions

pull/1565/head
Jacob Salmela 7 years ago
parent daff5d8b5a
commit 8c5c1316dd
No known key found for this signature in database
GPG Key ID: 1962FF1A5046135E

@ -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

Loading…
Cancel
Save