add process check function

This commit is contained in:
Jacob Salmela 2017-05-23 22:57:22 -05:00
parent 085f2c6ca0
commit 1a87d3a659
No known key found for this signature in database
GPG key ID: 1962FF1A5046135E

View file

@ -351,6 +351,16 @@ check_networking() {
check_required_ports check_required_ports
} }
process_status(){
echo_current_diagnostic "Pi-hole processes"
PROCESSES=( dnsmasq lighttpd pihole-FTL )
local i
for i in "${PROCESSES[@]}"; do
local status_of_process=$(systemctl is-active "${i}")
echo -e " [i] ${i} daemon is ${status_of_process}"
done
}
parse_file() { parse_file() {
# Set the first argument passed to tihs function as a named variable for better readability # Set the first argument passed to tihs function as a named variable for better readability
local filename="${1}" local filename="${1}"
@ -437,5 +447,6 @@ diagnose_setup_variables
diagnose_operating_system diagnose_operating_system
processor_check processor_check
check_networking check_networking
process_status
check_critical_dependencies check_critical_dependencies
check_dnsmasq_d check_dnsmasq_d