Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–1065 unchanged (1065 lines)
1066 done
1067
1068 IFS="$OLD_IFS"
1069}
1070
1071show_groups() {
1072 show_db_entries "Groups" "SELECT id,CASE enabled WHEN '0' THEN ' no' WHEN '1' THEN ' yes' ELSE enabled END enabled,name,datetime(date_added,'unixepoch','localtime') date_added,datetime(date_modified,'unixepoch','localtime') date_modified,description FROM \"group\"" "4 7 50 19 19 50"
1073}
1074
1075show_adlists() {
1076 show_db_entries "Adlists" "SELECT id,CASE enabled WHEN '0' THEN ' no' WHEN '1' THEN ' yes' ELSE enabled END enabled,GROUP_CONCAT(adlist_by_group.group_id) group_ids, CASE type WHEN '0' THEN 'Block' WHEN '1' THEN 'Allow' ELSE type END type, address,datetime(date_added,'unixepoch','localtime') date_added,datetime(date_modified,'unixepoch','localtime') date_modified,comment FROM adlist LEFT JOIN adlist_by_group ON adlist.id = adlist_by_group.adlist_id GROUP BY id;" "5 7 12 5 100 19 19 50"
1077}
1078
1079show_domainlist() {
1080 show_db_entries "Domainlist" "SELECT id,CASE type WHEN '0' THEN 'exact-allow' WHEN '1' THEN 'exact-deny' WHEN '2' THEN 'regex-allow' WHEN '3' THEN 'regex-deny' ELSE type END type,CASE enabled WHEN '0' THEN ' no' WHEN '1' THEN ' yes' ELSE enabled END enabled,GROUP_CONCAT(domainlist_by_group.group_id) group_ids,domain,datetime(date_added,'unixepoch','localtime') date_added,datetime(date_modified,'unixepoch','localtime') date_modified,comment FROM domainlist LEFT JOIN domainlist_by_group ON domainlist.id = domainlist_by_group.domainlist_id GROUP BY id;" "5 11 7 12 100 19 19 50"
1081}
1082
1083show_clients() {
1084 show_db_entries "Clients" "SELECT id,GROUP_CONCAT(client_by_group.group_id) group_ids,ip,datetime(date_added,'unixepoch','localtime') date_added,datetime(date_modified,'unixepoch','localtime') date_modified,comment FROM client LEFT JOIN client_by_group ON client.id = client_by_group.client_id GROUP BY id;" "4 12 100 19 19 50"
1085}
1086
…lines 1087–1326 unchanged (240 lines)

After

…lines 1–1065 unchanged (1065 lines)
1066 done
1067
1068 IFS="$OLD_IFS"
1069}
1070
1071show_groups() {
1072 show_db_entries "Groups" "SELECT id,CASE enabled WHEN '0' THEN '--no---' WHEN '1' THEN '--yes--' ELSE enabled END enabled,name,datetime(date_added,'unixepoch','localtime') date_added,datetime(date_modified,'unixepoch','localtime') date_modified,description FROM \"group\"" "4 7 50 19 19 50"
1073}
1074
1075show_adlists() {
1076 show_db_entries "Adlists" "SELECT id,CASE enabled WHEN '0' THEN '--no---' WHEN '1' THEN '--yes--' ELSE enabled END enabled,GROUP_CONCAT(adlist_by_group.group_id) group_ids, CASE type WHEN '0' THEN '-BLOCK-' WHEN '1' THEN '-ALLOW-' ELSE type END type, address,datetime(date_added,'unixepoch','localtime') date_added,datetime(date_modified,'unixepoch','localtime') date_modified,comment FROM adlist LEFT JOIN adlist_by_group ON adlist.id = adlist_by_group.adlist_id GROUP BY id;" "5 7 12 7 100 19 19 50"
1077}
1078
1079show_domainlist() {
1080 show_db_entries "Domainlist" "SELECT id,CASE type WHEN '0' THEN 'exact-allow' WHEN '1' THEN 'exact-deny' WHEN '2' THEN 'regex-allow' WHEN '3' THEN 'regex-deny' ELSE type END type,CASE enabled WHEN '0' THEN '--no---' WHEN '1' THEN '--yes--' ELSE enabled END enabled,GROUP_CONCAT(domainlist_by_group.group_id) group_ids,domain,datetime(date_added,'unixepoch','localtime') date_added,datetime(date_modified,'unixepoch','localtime') date_modified,comment FROM domainlist LEFT JOIN domainlist_by_group ON domainlist.id = domainlist_by_group.domainlist_id GROUP BY id;" "5 11 7 12 90 19 19 50"
1081}
1082
1083show_clients() {
1084 show_db_entries "Clients" "SELECT id,GROUP_CONCAT(client_by_group.group_id) group_ids,ip,datetime(date_added,'unixepoch','localtime') date_added,datetime(date_modified,'unixepoch','localtime') date_modified,comment FROM client LEFT JOIN client_by_group ON client.id = client_by_group.client_id GROUP BY id;" "4 12 100 19 19 50"
1085}
1086
…lines 1087–1326 unchanged (240 lines)

Before

program
comment "#!/usr/bin/env bash"
comment "# Pi-hole: A black hole for Internet advertisements"
comment "# (c) 2017 Pi-hole, LLC (https://pi-hole.net)"
comment "# Network-wide ad blocking via your own hardware."
comment "#"
comment "# Generates pihole_debug.log to be used for troubleshooting."
comment "#"
comment "# This file is copyright under the latest version of the EUP"...
comment "# Please see LICENSE file for your rights under this license"...
comment "# -e option instructs bash to immediately exit if any comman"...
comment "# -u a reference to any variable you haven't previously defi"...
comment "# with the exceptions of $* and $@ - is an error, and causes"...
comment "# -o pipefail prevents errors in a pipeline from being maske"...
comment "# that return code will be used as the return code of the wh"...
comment "# pipeline's return code is that of the last command - even "...
command
command_name
word "set"
word "-o"
word "pipefail"
comment "#IFS=$'\\n\\t'"
comment "######## GLOBAL VARS ########"
comment "# These variables would normally be next to the other files"
comment "# but we need them to be first in order to get the colors ne"...
variable_assignment
variable_name "PIHOLE_SCRIPTS_DIRECTORY"
= "="
string
" "\""
string_content "/opt/pihole"
" "\""
variable_assignment
variable_name "PIHOLE_COLTABLE_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_SCRIPTS_DIRECTORY"
} "}"
string_content "/COL_TABLE"
" "\""
comment "# These provide the colors we need for making the log more r"...
if_statement (+91 nodes collapsed)
comment "# shellcheck source=/dev/null"
command
command_name
word "."
word "/etc/pihole/versions"
comment "# Read the value of an FTL config key. The value is printed "...
function_definition (+27 nodes collapsed)
comment "# FAQ URLs for use in showing the debug log"
variable_assignment
variable_name "FAQ_HARDWARE_REQUIREMENTS"
= "="
string
" "\""
expansion
${ "${"
variable_name "COL_CYAN"
} "}"
string_content "https://docs.pi-hole.net/main/prerequisites/"
expansion
${ "${"
variable_name "COL_NC"
} "}"
" "\""
variable_assignment
variable_name "FAQ_HARDWARE_REQUIREMENTS_PORTS"
= "="
string
" "\""
expansion
${ "${"
variable_name "COL_CYAN"
} "}"
string_content "https://docs.pi-hole.net/main/prerequisites/#ports"
expansion
${ "${"
variable_name "COL_NC"
} "}"
" "\""
variable_assignment
variable_name "FAQ_HARDWARE_REQUIREMENTS_FIREWALLD"
= "="
string
" "\""
expansion
${ "${"
variable_name "COL_CYAN"
} "}"
string_content "https://docs.pi-hole.net/main/prerequisites/#firewalld"
expansion
${ "${"
variable_name "COL_NC"
} "}"
" "\""
variable_assignment
variable_name "FAQ_GATEWAY"
= "="
string
" "\""
expansion
${ "${"
variable_name "COL_CYAN"
} "}"
string_content "https://discourse.pi-hole.net/t/why-is-a-default-gateway-imp"...
expansion
${ "${"
variable_name "COL_NC"
} "}"
" "\""
comment "# Other URLs we may use"
variable_assignment
variable_name "FORUMS_URL"
= "="
string
" "\""
expansion
${ "${"
variable_name "COL_CYAN"
} "}"
string_content "https://discourse.pi-hole.net"
expansion
${ "${"
variable_name "COL_NC"
} "}"
" "\""
comment "# Directories required by Pi-hole"
comment "# https://discourse.pi-hole.net/t/what-files-does-pi-hole-us"...
variable_assignment
variable_name "CORE_GIT_DIRECTORY"
= "="
string
" "\""
string_content "/etc/.pihole"
" "\""
variable_assignment
variable_name "CRON_D_DIRECTORY"
= "="
string
" "\""
string_content "/etc/cron.d"
" "\""
variable_assignment
variable_name "DNSMASQ_D_DIRECTORY"
= "="
string
" "\""
string_content "/etc/dnsmasq.d"
" "\""
variable_assignment
variable_name "PIHOLE_DIRECTORY"
= "="
string
" "\""
string_content "/etc/pihole"
" "\""
variable_assignment
variable_name "PIHOLE_SCRIPTS_DIRECTORY"
= "="
string
" "\""
string_content "/opt/pihole"
" "\""
variable_assignment
variable_name "BIN_DIRECTORY"
= "="
string
" "\""
string_content "/usr/local/bin"
" "\""
variable_assignment
variable_name "LOG_DIRECTORY"
= "="
string
" "\""
string_content "/var/log/pihole"
" "\""
variable_assignment
variable_name "HTML_DIRECTORY"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "webserver.paths.webroot"
" "\""
) ")"
" "\""
variable_assignment
variable_name "WEBHOME_PATH"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "webserver.paths.webhome"
" "\""
) ")"
" "\""
variable_assignment
variable_name "WEB_GIT_DIRECTORY"
= "="
string
" "\""
expansion
${ "${"
variable_name "HTML_DIRECTORY"
} "}"
expansion
${ "${"
variable_name "WEBHOME_PATH"
} "}"
" "\""
variable_assignment
variable_name "SHM_DIRECTORY"
= "="
string
" "\""
string_content "/dev/shm"
" "\""
variable_assignment
variable_name "ETC"
= "="
string
" "\""
string_content "/etc"
" "\""
comment "# Files required by Pi-hole"
comment "# https://discourse.pi-hole.net/t/what-files-does-pi-hole-us"...
variable_assignment
variable_name "PIHOLE_CRON_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "CRON_D_DIRECTORY"
} "}"
string_content "/pihole"
" "\""
variable_assignment
variable_name "PIHOLE_INSTALL_LOG_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_DIRECTORY"
} "}"
string_content "/install.log"
" "\""
variable_assignment
variable_name "PIHOLE_RAW_BLOCKLIST_FILES"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_DIRECTORY"
} "}"
string_content "/list.*"
" "\""
variable_assignment
variable_name "PIHOLE_LOGROTATE_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_DIRECTORY"
} "}"
string_content "/logrotate"
" "\""
variable_assignment
variable_name "PIHOLE_FTL_CONF_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_DIRECTORY"
} "}"
string_content "/pihole.toml"
" "\""
variable_assignment
variable_name "PIHOLE_DNSMASQ_CONF_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_DIRECTORY"
} "}"
string_content "/dnsmasq.conf"
" "\""
variable_assignment
variable_name "PIHOLE_VERSIONS_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_DIRECTORY"
} "}"
string_content "/versions"
" "\""
variable_assignment
variable_name "PIHOLE_GRAVITY_DB_FILE"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "files.gravity"
" "\""
) ")"
" "\""
variable_assignment
variable_name "PIHOLE_FTL_DB_FILE"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "files.database"
" "\""
) ")"
" "\""
variable_assignment
variable_name "PIHOLE_COMMAND"
= "="
string
" "\""
expansion
${ "${"
variable_name "BIN_DIRECTORY"
} "}"
string_content "/pihole"
" "\""
variable_assignment
variable_name "PIHOLE_COLTABLE_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "BIN_DIRECTORY"
} "}"
string_content "/COL_TABLE"
" "\""
variable_assignment
variable_name "FTL_PID"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "files.pid"
" "\""
) ")"
" "\""
variable_assignment
variable_name "PIHOLE_LOG"
= "="
string
" "\""
expansion
${ "${"
variable_name "LOG_DIRECTORY"
} "}"
string_content "/pihole.log"
" "\""
variable_assignment
variable_name "PIHOLE_LOG_GZIPS"
= "="
string
" "\""
expansion
${ "${"
variable_name "LOG_DIRECTORY"
} "}"
string_content "/pihole.log.[0-9].*"
" "\""
variable_assignment
variable_name "PIHOLE_DEBUG_LOG"
= "="
string
" "\""
expansion
${ "${"
variable_name "LOG_DIRECTORY"
} "}"
string_content "/pihole_debug.log"
" "\""
variable_assignment
variable_name "PIHOLE_FTL_LOG"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "files.log.ftl"
" "\""
) ")"
" "\""
variable_assignment
variable_name "PIHOLE_WEBSERVER_LOG"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "files.log.webserver"
" "\""
) ")"
" "\""
variable_assignment
variable_name "RESOLVCONF"
= "="
string
" "\""
expansion
${ "${"
variable_name "ETC"
} "}"
string_content "/resolv.conf"
" "\""
variable_assignment
variable_name "DNSMASQ_CONF"
= "="
string
" "\""
expansion
${ "${"
variable_name "ETC"
} "}"
string_content "/dnsmasq.conf"
" "\""
comment "# Store Pi-hole's processes in an array for easy use and par"...
variable_assignment
variable_name "PIHOLE_PROCESSES"
= "="
array
( "("
string
" "\""
string_content "pihole-FTL"
" "\""
) ")"
comment "# Store the required directories in an array so it can be pa"...
variable_assignment (+132 nodes collapsed)
variable_assignment
variable_name "DISCLAIMER"
= "="
string
" "\""
string_content "This process collects information from your Pi-hole, and opt"...
string_content "The intent of this script is to allow users to self-diagnose"...
string_content "NOTE: All log files auto-delete after 48 hours and ONLY the "...
" "\""
function_definition
word "show_disclaimer"
( "("
) ")"
compound_statement
{ "{"
command
command_name
word "log_write"
string
" "\""
expansion
${ "${"
variable_name "DISCLAIMER"
} "}"
" "\""
} "}"
function_definition (+45 nodes collapsed)
function_definition (+31 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+90 nodes collapsed)
comment "# This is a function for visually displaying the current tes"...
comment "# Accepts one variable: the name of what is being diagnosed"
function_definition (+28 nodes collapsed)
function_definition (+519 nodes collapsed)
function_definition (+154 nodes collapsed)
comment "# Checks the core version of the Pi-hole codebase"
function_definition (+41 nodes collapsed)
function_definition (+196 nodes collapsed)
function_definition (+204 nodes collapsed)
function_definition (+416 nodes collapsed)
function_definition (+117 nodes collapsed)
function_definition (+118 nodes collapsed)
function_definition (+94 nodes collapsed)
function_definition (+39 nodes collapsed)
function_definition (+73 nodes collapsed)
function_definition (+424 nodes collapsed)
function_definition (+129 nodes collapsed)
function_definition (+151 nodes collapsed)
function_definition (+282 nodes collapsed)
function_definition (+77 nodes collapsed)
function_definition (+29 nodes collapsed)
function_definition (+49 nodes collapsed)
function_definition (+864 nodes collapsed)
function_definition (+275 nodes collapsed)
function_definition (+104 nodes collapsed)
function_definition (+158 nodes collapsed)
function_definition (+211 nodes collapsed)
function_definition
word "check_name_resolution"
( "("
) ")"
compound_statement
{ "{"
comment "# Check name resolution from localhost, Pi-hole's IP, and Go"...
comment "# using the function we created earlier"
command
command_name
word "dig_at"
number "4"
command
command_name
word "dig_at"
number "6"
} "}"
comment "# This function can check a directory exists"
comment "# Pi-hole has files in several places, so we will reuse this"...
function_definition (+113 nodes collapsed)
function_definition (+459 nodes collapsed)
function_definition (+47 nodes collapsed)
function_definition (+68 nodes collapsed)
function_definition (+256 nodes collapsed)
function_definition (+161 nodes collapsed)
function_definition (+161 nodes collapsed)
function_definition (+92 nodes collapsed)
function_definition
word "show_groups"
( "("
) ")"
compound_statement
{ "{"
command
command_name
word "show_db_entries"
string
" "\""
string_content "Groups"
" "\""
string
" "\""
string_content "SELECT id,CASE enabled WHEN '0' THEN ' no' WHEN '1' THEN ' "...
" "\""
string
" "\""
string_content "4 7 50 19 19 50"
" "\""
} "}"
function_definition
word "show_adlists"
( "("
) ")"
compound_statement
{ "{"
command
command_name
word "show_db_entries"
string
" "\""
string_content "Adlists"
" "\""
string
" "\""
string_content "SELECT id,CASE enabled WHEN '0' THEN ' no' WHEN '1' THEN ' "...
" "\""
string
" "\""
string_content "5 7 12 5 100 19 19 50"
" "\""
} "}"
function_definition
word "show_domainlist"
( "("
) ")"
compound_statement
{ "{"
command
command_name
word "show_db_entries"
string
" "\""
string_content "Domainlist"
" "\""
string
" "\""
string_content "SELECT id,CASE type WHEN '0' THEN 'exact-allow' WHEN '1' THE"...
" "\""
string
" "\""
string_content "5 11 7 12 100 19 19 50"
" "\""
} "}"
function_definition (+22 nodes collapsed)
function_definition (+22 nodes collapsed)
function_definition (+45 nodes collapsed)
function_definition (+247 nodes collapsed)
function_definition (+53 nodes collapsed)
function_definition (+314 nodes collapsed)
comment "# Show a text spinner during a long process run"
function_definition (+269 nodes collapsed)
function_definition (+121 nodes collapsed)
function_definition (+133 nodes collapsed)
function_definition (+421 nodes collapsed)
comment "# Run through all the functions we made"
command
command_name
word "make_temporary_log"
command
command_name
word "initialize_debug"
command
command_name
word "check_component_versions"
comment "# check_critical_program_versions"
command
command_name
word "diagnose_operating_system"
command
command_name
word "check_selinux"
command
command_name
word "check_firewalld"
command
command_name
word "hardware_check"
command
command_name
word "disk_usage"
command
command_name
word "check_ip_command"
command
command_name
word "check_networking"
command
command_name
word "check_name_resolution"
command
command_name
word "check_dhcp_servers"
command
command_name
word "process_status"
command
command_name
word "ftl_full_status"
command
command_name
word "analyze_ftl_db"
command
command_name
word "analyze_gravity_list"
command
command_name
word "show_groups"
command
command_name
word "show_domainlist"
command
command_name
word "show_clients"
command
command_name
word "show_adlists"
command
command_name
word "show_content_of_pihole_files"
command
command_name
word "show_messages"
command
command_name
word "parse_locale"
command
command_name
word "analyze_pihole_log"
command
command_name
word "copy_to_debug_log"
command
command_name
word "upload_to_tricorder"

After

program
comment "#!/usr/bin/env bash"
comment "# Pi-hole: A black hole for Internet advertisements"
comment "# (c) 2017 Pi-hole, LLC (https://pi-hole.net)"
comment "# Network-wide ad blocking via your own hardware."
comment "#"
comment "# Generates pihole_debug.log to be used for troubleshooting."
comment "#"
comment "# This file is copyright under the latest version of the EUP"...
comment "# Please see LICENSE file for your rights under this license"...
comment "# -e option instructs bash to immediately exit if any comman"...
comment "# -u a reference to any variable you haven't previously defi"...
comment "# with the exceptions of $* and $@ - is an error, and causes"...
comment "# -o pipefail prevents errors in a pipeline from being maske"...
comment "# that return code will be used as the return code of the wh"...
comment "# pipeline's return code is that of the last command - even "...
command
command_name
word "set"
word "-o"
word "pipefail"
comment "#IFS=$'\\n\\t'"
comment "######## GLOBAL VARS ########"
comment "# These variables would normally be next to the other files"
comment "# but we need them to be first in order to get the colors ne"...
variable_assignment
variable_name "PIHOLE_SCRIPTS_DIRECTORY"
= "="
string
" "\""
string_content "/opt/pihole"
" "\""
variable_assignment
variable_name "PIHOLE_COLTABLE_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_SCRIPTS_DIRECTORY"
} "}"
string_content "/COL_TABLE"
" "\""
comment "# These provide the colors we need for making the log more r"...
if_statement (+91 nodes collapsed)
comment "# shellcheck source=/dev/null"
command
command_name
word "."
word "/etc/pihole/versions"
comment "# Read the value of an FTL config key. The value is printed "...
function_definition (+27 nodes collapsed)
comment "# FAQ URLs for use in showing the debug log"
variable_assignment
variable_name "FAQ_HARDWARE_REQUIREMENTS"
= "="
string
" "\""
expansion
${ "${"
variable_name "COL_CYAN"
} "}"
string_content "https://docs.pi-hole.net/main/prerequisites/"
expansion
${ "${"
variable_name "COL_NC"
} "}"
" "\""
variable_assignment
variable_name "FAQ_HARDWARE_REQUIREMENTS_PORTS"
= "="
string
" "\""
expansion
${ "${"
variable_name "COL_CYAN"
} "}"
string_content "https://docs.pi-hole.net/main/prerequisites/#ports"
expansion
${ "${"
variable_name "COL_NC"
} "}"
" "\""
variable_assignment
variable_name "FAQ_HARDWARE_REQUIREMENTS_FIREWALLD"
= "="
string
" "\""
expansion
${ "${"
variable_name "COL_CYAN"
} "}"
string_content "https://docs.pi-hole.net/main/prerequisites/#firewalld"
expansion
${ "${"
variable_name "COL_NC"
} "}"
" "\""
variable_assignment
variable_name "FAQ_GATEWAY"
= "="
string
" "\""
expansion
${ "${"
variable_name "COL_CYAN"
} "}"
string_content "https://discourse.pi-hole.net/t/why-is-a-default-gateway-imp"...
expansion
${ "${"
variable_name "COL_NC"
} "}"
" "\""
comment "# Other URLs we may use"
variable_assignment
variable_name "FORUMS_URL"
= "="
string
" "\""
expansion
${ "${"
variable_name "COL_CYAN"
} "}"
string_content "https://discourse.pi-hole.net"
expansion
${ "${"
variable_name "COL_NC"
} "}"
" "\""
comment "# Directories required by Pi-hole"
comment "# https://discourse.pi-hole.net/t/what-files-does-pi-hole-us"...
variable_assignment
variable_name "CORE_GIT_DIRECTORY"
= "="
string
" "\""
string_content "/etc/.pihole"
" "\""
variable_assignment
variable_name "CRON_D_DIRECTORY"
= "="
string
" "\""
string_content "/etc/cron.d"
" "\""
variable_assignment
variable_name "DNSMASQ_D_DIRECTORY"
= "="
string
" "\""
string_content "/etc/dnsmasq.d"
" "\""
variable_assignment
variable_name "PIHOLE_DIRECTORY"
= "="
string
" "\""
string_content "/etc/pihole"
" "\""
variable_assignment
variable_name "PIHOLE_SCRIPTS_DIRECTORY"
= "="
string
" "\""
string_content "/opt/pihole"
" "\""
variable_assignment
variable_name "BIN_DIRECTORY"
= "="
string
" "\""
string_content "/usr/local/bin"
" "\""
variable_assignment
variable_name "LOG_DIRECTORY"
= "="
string
" "\""
string_content "/var/log/pihole"
" "\""
variable_assignment
variable_name "HTML_DIRECTORY"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "webserver.paths.webroot"
" "\""
) ")"
" "\""
variable_assignment
variable_name "WEBHOME_PATH"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "webserver.paths.webhome"
" "\""
) ")"
" "\""
variable_assignment
variable_name "WEB_GIT_DIRECTORY"
= "="
string
" "\""
expansion
${ "${"
variable_name "HTML_DIRECTORY"
} "}"
expansion
${ "${"
variable_name "WEBHOME_PATH"
} "}"
" "\""
variable_assignment
variable_name "SHM_DIRECTORY"
= "="
string
" "\""
string_content "/dev/shm"
" "\""
variable_assignment
variable_name "ETC"
= "="
string
" "\""
string_content "/etc"
" "\""
comment "# Files required by Pi-hole"
comment "# https://discourse.pi-hole.net/t/what-files-does-pi-hole-us"...
variable_assignment
variable_name "PIHOLE_CRON_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "CRON_D_DIRECTORY"
} "}"
string_content "/pihole"
" "\""
variable_assignment
variable_name "PIHOLE_INSTALL_LOG_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_DIRECTORY"
} "}"
string_content "/install.log"
" "\""
variable_assignment
variable_name "PIHOLE_RAW_BLOCKLIST_FILES"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_DIRECTORY"
} "}"
string_content "/list.*"
" "\""
variable_assignment
variable_name "PIHOLE_LOGROTATE_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_DIRECTORY"
} "}"
string_content "/logrotate"
" "\""
variable_assignment
variable_name "PIHOLE_FTL_CONF_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_DIRECTORY"
} "}"
string_content "/pihole.toml"
" "\""
variable_assignment
variable_name "PIHOLE_DNSMASQ_CONF_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_DIRECTORY"
} "}"
string_content "/dnsmasq.conf"
" "\""
variable_assignment
variable_name "PIHOLE_VERSIONS_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "PIHOLE_DIRECTORY"
} "}"
string_content "/versions"
" "\""
variable_assignment
variable_name "PIHOLE_GRAVITY_DB_FILE"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "files.gravity"
" "\""
) ")"
" "\""
variable_assignment
variable_name "PIHOLE_FTL_DB_FILE"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "files.database"
" "\""
) ")"
" "\""
variable_assignment
variable_name "PIHOLE_COMMAND"
= "="
string
" "\""
expansion
${ "${"
variable_name "BIN_DIRECTORY"
} "}"
string_content "/pihole"
" "\""
variable_assignment
variable_name "PIHOLE_COLTABLE_FILE"
= "="
string
" "\""
expansion
${ "${"
variable_name "BIN_DIRECTORY"
} "}"
string_content "/COL_TABLE"
" "\""
variable_assignment
variable_name "FTL_PID"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "files.pid"
" "\""
) ")"
" "\""
variable_assignment
variable_name "PIHOLE_LOG"
= "="
string
" "\""
expansion
${ "${"
variable_name "LOG_DIRECTORY"
} "}"
string_content "/pihole.log"
" "\""
variable_assignment
variable_name "PIHOLE_LOG_GZIPS"
= "="
string
" "\""
expansion
${ "${"
variable_name "LOG_DIRECTORY"
} "}"
string_content "/pihole.log.[0-9].*"
" "\""
variable_assignment
variable_name "PIHOLE_DEBUG_LOG"
= "="
string
" "\""
expansion
${ "${"
variable_name "LOG_DIRECTORY"
} "}"
string_content "/pihole_debug.log"
" "\""
variable_assignment
variable_name "PIHOLE_FTL_LOG"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "files.log.ftl"
" "\""
) ")"
" "\""
variable_assignment
variable_name "PIHOLE_WEBSERVER_LOG"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "get_ftl_conf_value"
string
" "\""
string_content "files.log.webserver"
" "\""
) ")"
" "\""
variable_assignment
variable_name "RESOLVCONF"
= "="
string
" "\""
expansion
${ "${"
variable_name "ETC"
} "}"
string_content "/resolv.conf"
" "\""
variable_assignment
variable_name "DNSMASQ_CONF"
= "="
string
" "\""
expansion
${ "${"
variable_name "ETC"
} "}"
string_content "/dnsmasq.conf"
" "\""
comment "# Store Pi-hole's processes in an array for easy use and par"...
variable_assignment
variable_name "PIHOLE_PROCESSES"
= "="
array
( "("
string
" "\""
string_content "pihole-FTL"
" "\""
) ")"
comment "# Store the required directories in an array so it can be pa"...
variable_assignment (+132 nodes collapsed)
variable_assignment
variable_name "DISCLAIMER"
= "="
string
" "\""
string_content "This process collects information from your Pi-hole, and opt"...
string_content "The intent of this script is to allow users to self-diagnose"...
string_content "NOTE: All log files auto-delete after 48 hours and ONLY the "...
" "\""
function_definition
word "show_disclaimer"
( "("
) ")"
compound_statement
{ "{"
command
command_name
word "log_write"
string
" "\""
expansion
${ "${"
variable_name "DISCLAIMER"
} "}"
" "\""
} "}"
function_definition (+45 nodes collapsed)
function_definition (+31 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+90 nodes collapsed)
comment "# This is a function for visually displaying the current tes"...
comment "# Accepts one variable: the name of what is being diagnosed"
function_definition (+28 nodes collapsed)
function_definition (+519 nodes collapsed)
function_definition (+154 nodes collapsed)
comment "# Checks the core version of the Pi-hole codebase"
function_definition (+41 nodes collapsed)
function_definition (+196 nodes collapsed)
function_definition (+204 nodes collapsed)
function_definition (+416 nodes collapsed)
function_definition (+117 nodes collapsed)
function_definition (+118 nodes collapsed)
function_definition (+94 nodes collapsed)
function_definition (+39 nodes collapsed)
function_definition (+73 nodes collapsed)
function_definition (+424 nodes collapsed)
function_definition (+129 nodes collapsed)
function_definition (+151 nodes collapsed)
function_definition (+282 nodes collapsed)
function_definition (+77 nodes collapsed)
function_definition (+29 nodes collapsed)
function_definition (+49 nodes collapsed)
function_definition (+864 nodes collapsed)
function_definition (+275 nodes collapsed)
function_definition (+104 nodes collapsed)
function_definition (+158 nodes collapsed)
function_definition (+211 nodes collapsed)
function_definition
word "check_name_resolution"
( "("
) ")"
compound_statement
{ "{"
comment "# Check name resolution from localhost, Pi-hole's IP, and Go"...
comment "# using the function we created earlier"
command
command_name
word "dig_at"
number "4"
command
command_name
word "dig_at"
number "6"
} "}"
comment "# This function can check a directory exists"
comment "# Pi-hole has files in several places, so we will reuse this"...
function_definition (+113 nodes collapsed)
function_definition (+459 nodes collapsed)
function_definition (+47 nodes collapsed)
function_definition (+68 nodes collapsed)
function_definition (+256 nodes collapsed)
function_definition (+161 nodes collapsed)
function_definition (+161 nodes collapsed)
function_definition (+92 nodes collapsed)
function_definition
word "show_groups"
( "("
) ")"
compound_statement
{ "{"
command
command_name
word "show_db_entries"
string
" "\""
string_content "Groups"
" "\""
string
" "\""
string_content "SELECT id,CASE enabled WHEN '0' THEN '--no---' WHEN '1' THEN"...
" "\""
string
" "\""
string_content "4 7 50 19 19 50"
" "\""
} "}"
function_definition
word "show_adlists"
( "("
) ")"
compound_statement
{ "{"
command
command_name
word "show_db_entries"
string
" "\""
string_content "Adlists"
" "\""
string
" "\""
string_content "SELECT id,CASE enabled WHEN '0' THEN '--no---' WHEN '1' THEN"...
" "\""
string
" "\""
string_content "5 7 12 7 100 19 19 50"
" "\""
} "}"
function_definition
word "show_domainlist"
( "("
) ")"
compound_statement
{ "{"
command
command_name
word "show_db_entries"
string
" "\""
string_content "Domainlist"
" "\""
string
" "\""
string_content "SELECT id,CASE type WHEN '0' THEN 'exact-allow' WHEN '1' THE"...
" "\""
string
" "\""
string_content "5 11 7 12 90 19 19 50"
" "\""
} "}"
function_definition (+22 nodes collapsed)
function_definition (+22 nodes collapsed)
function_definition (+45 nodes collapsed)
function_definition (+247 nodes collapsed)
function_definition (+53 nodes collapsed)
function_definition (+314 nodes collapsed)
comment "# Show a text spinner during a long process run"
function_definition (+269 nodes collapsed)
function_definition (+121 nodes collapsed)
function_definition (+133 nodes collapsed)
function_definition (+421 nodes collapsed)
comment "# Run through all the functions we made"
command
command_name
word "make_temporary_log"
command
command_name
word "initialize_debug"
command
command_name
word "check_component_versions"
comment "# check_critical_program_versions"
command
command_name
word "diagnose_operating_system"
command
command_name
word "check_selinux"
command
command_name
word "check_firewalld"
command
command_name
word "hardware_check"
command
command_name
word "disk_usage"
command
command_name
word "check_ip_command"
command
command_name
word "check_networking"
command
command_name
word "check_name_resolution"
command
command_name
word "check_dhcp_servers"
command
command_name
word "process_status"
command
command_name
word "ftl_full_status"
command
command_name
word "analyze_ftl_db"
command
command_name
word "analyze_gravity_list"
command
command_name
word "show_groups"
command
command_name
word "show_domainlist"
command
command_name
word "show_clients"
command
command_name
word "show_adlists"
command
command_name
word "show_content_of_pihole_files"
command
command_name
word "show_messages"
command
command_name
word "parse_locale"
command
command_name
word "analyze_pihole_log"
command
command_name
word "copy_to_debug_log"
command
command_name
word "upload_to_tricorder"