diff options
author | Adam Warner <me@adamwarner.co.uk> | 2021-10-05 18:36:33 +0300 |
---|---|---|
committer | Adam Warner <me@adamwarner.co.uk> | 2022-08-08 19:12:16 +0300 |
commit | 5d5a85b7b6a79df04f7eaa4177608153dca02401 (patch) | |
tree | b5faf268ad134e83c39e77d1d497e45200da4101 /advanced | |
parent | c78cf82fc6dc2f4d612ce4c27a36b2f3a26353fd (diff) |
X-Pi-hole removed from blocking page...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
Diffstat (limited to 'advanced')
-rwxr-xr-x | advanced/Scripts/piholeDebug.sh | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index 1707b872..79452f00 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -797,29 +797,13 @@ check_x_headers() { # server is operating correctly echo_current_diagnostic "Dashboard and block page" # Use curl -I to get the header and parse out just the X-Pi-hole one - local block_page - block_page=$(curl -Is localhost | awk '/X-Pi-hole/' | tr -d '\r') - # Do it for the dashboard as well, as the header is different than above local dashboard dashboard=$(curl -Is localhost/admin/ | awk '/X-Pi-hole/' | tr -d '\r') # Store what the X-Header should be in variables for comparison later - local block_page_working - block_page_working="X-Pi-hole: A black hole for Internet advertisements." local dashboard_working dashboard_working="X-Pi-hole: The Pi-hole Web interface is working!" - local full_curl_output_block_page - full_curl_output_block_page="$(curl -Is localhost)" local full_curl_output_dashboard full_curl_output_dashboard="$(curl -Is localhost/admin/)" - # If the X-header found by curl matches what is should be, - if [[ $block_page == "$block_page_working" ]]; then - # display a success message - log_write "$TICK Block page X-Header: ${COL_GREEN}${block_page}${COL_NC}" - else - # Otherwise, show an error - log_write "$CROSS Block page X-Header: ${COL_RED}X-Header does not match or could not be retrieved.${COL_NC}" - log_write "${COL_RED}${full_curl_output_block_page}${COL_NC}" - fi # Same logic applies to the dashboard as above, if the X-Header matches what a working system should have, if [[ $dashboard == "$dashboard_working" ]]; then |