diff options
author | Christian König <ckoenig@posteo.de> | 2022-05-29 10:51:33 +0300 |
---|---|---|
committer | Christian König <ckoenig@posteo.de> | 2022-07-11 00:32:47 +0300 |
commit | b486786041cd235151e189e17f4c869751150e78 (patch) | |
tree | ac42d56393235421598a244bc3a15b3e244deb6d /pihole | |
parent | e0baf4c7ecd8f3273c84fd8df4e461f50afd6374 (diff) |
Add database healthy checks to debug script
Fix health check output comparison in gravity script as well
Add note about waiting time
Signed-off-by: Christian König <ckoenig@posteo.de>
Diffstat (limited to 'pihole')
-rwxr-xr-x | pihole | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -36,19 +36,20 @@ listFunc() { } debugFunc() { - local automated - local web - - # Pull off the `debug` leaving passed call augmentation flags in $1 - shift - if [[ "$@" == *"-a"* ]]; then - automated="true" - fi - if [[ "$@" == *"-w"* ]]; then - web="true" - fi - - AUTOMATED=${automated:-} WEBCALL=${web:-} "${PI_HOLE_SCRIPT_DIR}"/piholeDebug.sh + local automated + local web + local check_database_integrity + # Pull off the `debug` leaving passed call augmentation flags in $1 + shift + + for value in "$@"; do + [[ "$value" == *"-a"* ]] && automated="true" + [[ "$value" == *"-w"* ]] && web="true" + [[ "$value" == *"-c"* ]] && check_database_integrity="true" + [[ "$value" == *"--check_database"* ]] && check_database_integrity="true" + done + + AUTOMATED=${automated:-} WEBCALL=${web:-} CHECK_DATABASE=${check_database_integrity:-} "${PI_HOLE_SCRIPT_DIR}"/piholeDebug.sh exit 0 } @@ -455,6 +456,7 @@ Whitelist/Blacklist Options: Debugging Options: -d, debug Start a debugging session + Add '-c' or '--check-database' to include a Pi-hole database integrity check Add '-a' to automatically upload the log to tricorder.pi-hole.net -f, flush Flush the Pi-hole log -r, reconfigure Reconfigure or Repair Pi-hole subsystems |