From 50316ee617c9d36b9493a32841579483545c5430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Mon, 23 Nov 2020 21:09:35 +0100 Subject: [PATCH 1/3] Add systemctl status --full --no-pager pihole-FTL.service to the debug log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- advanced/Scripts/piholeDebug.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index 52e11b6a..c2f94cd4 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -946,6 +946,16 @@ process_status(){ done } +pihole-FTL_full_status(){ + # if using systemd print the full status of pihole-FTL + echo_current_diagnostic "Pi-hole-FTL full status" + local FTL_status + if command -v systemctl &> /dev/null; then + FTL_status=$(systemctl status --full --no-pager pihole-FTL.service) + log_write " ${FTL_status}" + fi +} + make_array_from_file() { local filename="${1}" # The second argument can put a limit on how many line should be read from the file @@ -1379,6 +1389,7 @@ check_networking check_name_resolution check_dhcp_servers process_status +pihole-FTL_full_status parse_setup_vars check_x_headers analyze_gravity_list From ec5183b553ff03ba1dcfa7a7280779385895d91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Tue, 24 Nov 2020 05:57:13 +0100 Subject: [PATCH 2/3] Rename function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- advanced/Scripts/piholeDebug.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index c2f94cd4..da084f67 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -946,7 +946,7 @@ process_status(){ done } -pihole-FTL_full_status(){ +ftl_full_status(){ # if using systemd print the full status of pihole-FTL echo_current_diagnostic "Pi-hole-FTL full status" local FTL_status @@ -1389,7 +1389,7 @@ check_networking check_name_resolution check_dhcp_servers process_status -pihole-FTL_full_status +ftl_full_status parse_setup_vars check_x_headers analyze_gravity_list From 70c48afc046720f250ffad7bae8d987779154b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Tue, 24 Nov 2020 06:02:18 +0100 Subject: [PATCH 3/3] Add else statement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- advanced/Scripts/piholeDebug.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index da084f67..b77f6346 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -953,6 +953,8 @@ ftl_full_status(){ if command -v systemctl &> /dev/null; then FTL_status=$(systemctl status --full --no-pager pihole-FTL.service) log_write " ${FTL_status}" + else + log_write "${INFO} systemctl: command not found" fi }