Dan Schaper
250b445eee
Split declaration and population for stickler.
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
7 years ago
Mark Drobnak
bb9a18ef08
Merge pull request #1987 from ryanknapper/patch-1
...
Proper output for debug CPU detection
7 years ago
Jacob Salmela
1a275ba184
debug user locale; improve function to parse variables and files
...
Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>
7 years ago
Jacob Salmela
68c27eb2a1
add label to x-header so you know which one is being evaluated
...
Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>
7 years ago
Jacob Salmela
143e75d213
fix empty ports on some systems
...
Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>
7 years ago
Jacob Salmela
d9d3caec22
new head tail function and get head tail of pihole-FTL.log instead of just head
...
Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>
7 years ago
Jacob Salmela
7159ecb632
reduce ping times for faster script completion
...
Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>
7 years ago
Ryan Knapper
c17d95bfed
Proper output for debug CPU detection
...
Inserted "log_write" to properly output CPU detection lines.
Signed-off-by: Ryan Knapper (ryanknapper@gmail.com>
7 years ago
Vasilis Gerakaris
939806f021
piholeDebug.sh: Correct typo mistake
...
Signed-off-by: Vasilis Gerakaris <vgerak@gmail.com>
**By submitting this pull request, I confirm the following:**
`{please fill any appropriate checkboxes, e.g: [X]}`
- [x] I have read and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md ), as well as this entire template.
- [x] I have made only one major change in my proposed changes.
- [] I have commented my proposed changes within the code.
- [] I have tested my proposed changes, and have included unit tests where possible.
- [] I am willing to help maintain this change if there are issues with it later.
- [x] I give this submission freely and claim no ownership.
- [x] It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1 )
- [x] I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html ))
7 years ago
Adam Warner
8e0d76b63b
initiated -> initialized
...
Signed-off-by: Adam Warner <adamw@rner.email>
7 years ago
Jacob Salmela
28bed0041e
remove comment
...
Signed-off-by: Jacob Salmela <github@decoy.email>
7 years ago
Jacob Salmela
6f03e30151
fixes #1537 by checking if systemctl is found
...
Signed-off-by: Jacob Salmela <github@decoy.email>
7 years ago
Adam Warner
a9a40ca46c
Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
...
Signed-off-by: Adam Warner <adamw@rner.email>
7 years ago
bcambl
0f868f7649
remove un-used DONE variable
...
(still available via sourced COL_TABLE on line 29)
7 years ago
bcambl
31730e7197
add missing colors to COL_TABLE fallback
7 years ago
bcambl
7d76db00ac
update 'SELinux not detected' message
7 years ago
bcambl
8aceb8bf53
replace deprecated colors in debug script
...
- COL_LIGHT_GREEN -> COL_GREEN
- COL_LIGHT_RED -> COL_RED
- COL_LIGHT_PURPLE -> COL_PURPLE
7 years ago
bcambl
a17d1be7a4
simplify selinux debug variables
7 years ago
bcambl
1e6cc63abe
add SELinux checking to debug script
7 years ago
Adam Warner
7d56e2a937
`FTL` has an `L` in it, innit?
...
Signed-off-by: Adam Warner <adamw@rner.email>
7 years ago
Jacob Salmela
e1f818ffb7
Tweak/debug improvements ( #1585 )
...
* check for CIDR notation when comparing IPv6 address to that found in setupVars.conf
* highlight bad address entries in pihole.log and reference a corresponding FAQ
* show header output if Pi-holes x-header does not match
* fix automated mode when running from the dashboard. It would previously not automatically upload and generate a token.
* show disclaimer message
* undocumented feature for now: obfuscate domains in pihole.log so they are not visible when sent to the Pi-hole developers. We need to make an additonal flag for this in the pihole command. if the variable OBFUSCATE has a value, it will replace the domain in the log with a placeholder value
* fix small typo in the disclaimer
7 years ago
Jacob Salmela
05a724afae
codacy appeasement: remove useless cats
7 years ago
Jacob Salmela
1957b002bc
add comments about X-Headers and further explain the file descriptor cod.
7 years ago
Jacob Salmela
04cef25add
remove color character codes before uploading so the log is more readable on our plaintext tricorder server
7 years ago
Jacob Salmela
22fac5e1e0
additional shellcheck fixes
7 years ago
Jacob Salmela
b6a2a4ad5a
more shellcheck fixes
7 years ago
Jacob Salmela
5f00347019
appease shellcheck by removing two unneccesary functions and making some if/else blocks
7 years ago
Jacob Salmela
fc0440546f
add functions to parse head and tails of gravity.list and pihole.log
7 years ago
Jacob Salmela
172b8d2427
parse ftl log
7 years ago
Jacob Salmela
6d10a498a5
implement a limit on how many lines of a file we want to view
7 years ago
Jacob Salmela
881819ed5f
ignore big files we dont need to know about; also fix diagnosing pihole processes
7 years ago
Jacob Salmela
3275c5f710
more comments to help understand the script
7 years ago
Jacob Salmela
b0cc1a38c3
adjust minor formatting for better readability
7 years ago
Jacob Salmela
e10182c839
only parse files required by Pi-hole
7 years ago
Jacob Salmela
b4f1fe08f0
variablize all files and directories. also put required files and folders into an arry so we can compare them in later functions by parsing through them
7 years ago
Jacob Salmela
64171fa2a1
small color and formatting changes
7 years ago
Jacob Salmela
048eacd305
parse array in correct location
7 years ago
Jacob Salmela
24aa72c19d
condense repetative code into functions; parse the content of each file
7 years ago
Jacob Salmela
92b5fe4be4
check arch compatibility and add gateway faq url
7 years ago
Jacob Salmela
8b4c0b456b
exclude webpassword from being uploaded. also check that the IP addresses detected match those defined in setupVars.conf
7 years ago
Jacob Salmela
02a601deff
comment out dir checks for lighttpd, cronm and http as they have a lot of other files that need parsing through. May need to increase the logic there if this is information we really need to know.
7 years ago
Jacob Salmela
b207fadc04
check if os is supported based on pretty name
7 years ago
Jacob Salmela
d51c067e1b
change some verbiage; new function to compare the ports in use to the services assigned to them.
7 years ago
Jacob Salmela
2fea5d428d
condense repetitive code into functions
7 years ago
Jacob Salmela
d51e0c49b1
remove comments and blank lines when parsing files
7 years ago
Jacob Salmela
36907edd50
parse contents of each file in each dir, several log_writes
7 years ago
Jacob Salmela
7ec169ab10
more comments, fixed automated tricorder, variablizing echos, verify FTL version
7 years ago
Jacob Salmela
7873da1ae5
more colors. shortened dig timeouts
7 years ago
Jacob Salmela
ef5a6e7880
add faq urls to some functions, added more colors, also use a static url for remote digs
7 years ago
Jacob Salmela
96f01e670f
add functions to write to console and log at the same time
7 years ago
Jacob Salmela
5902be2a49
comments for every line
7 years ago
Jacob Salmela
cc946ce068
upload to tricorder functions
7 years ago
Jacob Salmela
1102fdc44b
append everything the user sees to the pihole_debug.log file
7 years ago
Jacob Salmela
c995c81fff
adjust some spacing
7 years ago
Jacob Salmela
6684af9938
add lighttpd list function and gravity analysis
7 years ago
Jacob Salmela
8bafd12f95
fix resolver functions and add x-header function
7 years ago
Jacob Salmela
76266cf31b
add resolver functions and check directory content functions
7 years ago
Jacob Salmela
1a87d3a659
add process check function
7 years ago
Jacob Salmela
085f2c6ca0
add port check function
7 years ago
Jacob Salmela
b74300f67c
add ping internet function and fix some spacing issues
7 years ago
Jacob Salmela
107babe8f4
add ping gateway function
7 years ago
Jacob Salmela
8fd9a22d18
add detect IP function
7 years ago
Jacob Salmela
8c5c1316dd
add php version and processor check functions
7 years ago
Jacob Salmela
daff5d8b5a
add critical dependencies version check functions
7 years ago
Jacob Salmela
6c4a7b626e
add pihole version check functions
7 years ago
Jacob Salmela
1aa5943e67
add if directory exists function
7 years ago
Jacob Salmela
69fe889f92
comments for all lines and small formatting changes
7 years ago
Jacob Salmela
5d7ef9281f
get just the OS pretty name for Dan
7 years ago
Jacob Salmela
6fa00e7cc8
first functions with pretty colors. check OS, setupVars, and contents of .d dirs
7 years ago
Dan Schaper
501b26decd
Log and echo gateway responses
7 years ago
DL6ER
30dcf6ff47
Include pihole-FTL.log in debug report
8 years ago
Dan Schaper
2740c68a63
Merge pull request #1335 from pi-hole/tweak/debug_templog
...
Debugging tweaks for temporary logfiles
8 years ago
Dan Schaper
b1f769b671
Output cleaning, IP stack check headers.
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
Dan Schaper
77378da70a
Cat out temp files to final log.
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
Dan Schaper
160030b75f
Quiet systemctl output to just the current daemon status.
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
Dan Schaper
0a0c3a2fb7
Copy working temp to final location.
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
Dan Schaper
e9f1ca338f
Create temp files for working storage, log to working storage temps.
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
Adam Warner
cfaf1ac67c
add check on file_parse to not include WEBPASSWORD= in the debug log
8 years ago
Dan Schaper
d1e0f3ae18
Merge pull request #1294 from pi-hole/tweak/debugDNS
...
Tweak DNS debugging
8 years ago
Dan Schaper
512c650441
Shellchecking.
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
Dan Schaper
dc44fc9e27
Version check amalgamation and removal of && || logic.
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
Dan Schaper
6f2fb57c08
Protocol specific records checks.
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
Dan Schaper
2547cc4c8d
Only run IPv6 if enabled, split out Chaos TXT checks.
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
DL6ER
9f4ef66f41
Add IPv6 resolver test
8 years ago
DL6ER
086f0790fc
Add Google's IPv6 address for potential IPv6 resolver tests
8 years ago
Dan Schaper
709b44f736
IPv4 DNS tests
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
Dan Schaper
6cd4ff6d68
Organize functions and function calls.
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
DL6ER
66b7d04b82
Merge branch 'development' into new/FTL-binary
8 years ago
Dan Schaper
83b0600863
Carriage return or newline based webcalls.
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
Dan Schaper
6c130b7960
Vebiage and highligh the token, also `:::`
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
Dan Schaper
7244d44a1d
Notify user that log is being uploaded.
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
Dan Schaper
9b060aab34
Debug auto mode engaged
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
8 years ago
Jacob Salmela
7a1a2dec67
update license to EUPL on core files
8 years ago
DL6ER
a64211123f
Some debug additions
8 years ago
Dan Schaper
053b38e0bd
Set up for IP matching in detection.
8 years ago
Dan Schaper
2aa3a109a0
Ping gateways and Internet.
8 years ago
Dan Schaper
472708376d
Split out IP checks.
8 years ago
Dan Schaper
cfed3d59e9
Begin fixing IP detection functions.
8 years ago
DL6ER
af8e629df4
Merge pull request #1239 from pi-hole/tweak/debug48h
...
Change description as we want to save the debug log for 48h instead of only 24h
8 years ago
DL6ER
01f980d49c
Change description as we want to save the debug log for 48h instead of only 24h
8 years ago
DL6ER
99fab7e52a
Scan whole dnsmasq.d directory for cofigurations files
8 years ago
Promofaux
fe8c365d17
codacy never lies
8 years ago
Promofaux
9acc3aac01
pipe `du -h` output to awk to ensure we only get the file size, and not the filename too. Yeah that's right Dom, pipe.
8 years ago
Promofaux
1ad23a065e
switch out `wc -l` with `grep -c ^`
8 years ago
Promofaux
de102fde5c
Add line count and size check for pihole.log
8 years ago
DL6ER
74a4e62cc9
Codacy fix
8 years ago
DL6ER
63a414a544
Align outputs
8 years ago
DL6ER
7d1f5091a7
Fixed small typo
8 years ago
DL6ER
3b54cab3bc
Show branches and revisions (incl. possible dirty state) in debug log
8 years ago
Dan Schaper
68cb0782c0
Add countdown timer
8 years ago
Dan Schaper
0f4c8d4923
Set default timeout to 60 seconds
8 years ago
Dan Schaper
6d2c5b2312
Add debug timeoute
8 years ago
Dan Schaper
a95ce11ca6
Add debug timeoute
8 years ago
Adam Warner
b191cd73a7
Update piholeDebug.sh
...
wording
8 years ago
Dan Schaper
dcf6e6b14d
Clarify user action required to end the scripts.
8 years ago
Dan Schaper
908697a963
User token instructions, and small bugfix for missing separator.
8 years ago
Dan Schaper
fad2d6b1d1
Return values start showin up now. Logic operators too...
8 years ago
Dan Schaper
9cd830b6aa
Start to refine tests and clean up code.
8 years ago
Dan Schaper
d9a16b0ff4
Clear up bottom half of script with fewer redundenicies.
8 years ago
Dan Schaper
cb5c94ef5e
Sorry, left that gravity.list parser in. Big debug files. Cleared that up.
8 years ago
Dan Schaper
85fbd66871
Good commit point, number of changes
8 years ago
Dan Schaper
d4a3a5c180
Trying to implement The Brontide Idiom for design.
8 years ago
Dan Schaper
71e3a473d6
Fix = underbar
8 years ago
Dan Schaper
c2cfc09f63
Clean up more of the UX and log. Lots to go.
8 years ago
Dan Schaper
01f10b56e8
Refactor out some more reudndant code.
8 years ago
Dan Schaper
90ec0a610e
Tricorder is introduced.
8 years ago
Dan Schaper
42bff1ce1b
Move parse utility to be near other parsing functions.
8 years ago
Dan Schaper
e3c7a1f31f
Top half user output updated.
8 years ago
Dan Schaper
0debbffa70
Add a couple of parsing utility functions.
8 years ago
Dan Schaper
f9570a82cc
Remove glitchy daemon detection.
8 years ago
Dan Schaper
36285ead57
Just becuase this is bugging me, but I'll fix it later.
8 years ago
Dan Schaper
13e488dace
Daemon check for lighttpd and dnsmasq.
8 years ago
Dan Schaper
f169da8fd0
Set for quiet temporarily.
8 years ago
Dan Schaper
60741298b7
Cut more verbosity. Prep for `lsof` parsing and daemon tests.
8 years ago
Dan Schaper
f73734acb0
Only check IPv6 Gateway if it exists.
8 years ago
Dan Schaper
fc360abe43
Only check IPv6 if system is enabled.
8 years ago
Dan Schaper
98db002770
Tighten IP test reponse to user.
8 years ago
Dan Schaper
4269626f5d
Attribute source for bashism.
8 years ago
Dan Schaper
8fa897aadb
Add back in sourcing files (setupVars.conf) and tweak `ip_check`
8 years ago
Dan Schaper
f549618d12
Move environment IPv6 interface check to `ip_check` and fix IPv6 source routing issue.
8 years ago
Dan Schaper
2fa47aaf31
Source routing is deprecated by RFC5095
8 years ago
Dan Schaper
b0874fb23a
Temporarily get rid of gateway sourcing from setupVars, temporarily.
8 years ago
Dan Schaper
fb70fd77e8
Prototype version_check, add helper functions for logging and echo.
8 years ago
Dan Schaper
01f17f9cbb
Reduce header verbosity. New header writer.
8 years ago
Promofaux
c958bed418
Consistency changes. Replace MOST uses of `echo >> ${DebugLog}` with usage of `log_write` function
8 years ago
Promofaux
2b2c240d39
Fix shebang line broken in #831
...
Remove root check and references to ${SUDO}
Check for /etc/pihole/setupVars.conf and use piholeInterace in IPv6 checks as suggest by @jacobsalmela https://github.com/pi-hole/pi-hole/pull/831#issuecomment-255606854
8 years ago
Marcus Hildum
d0b3727c5d
Consistency
...
Yet more cleanup
8 years ago
Marcus Hildum
0efda04920
Use heredocs instead of multiple calls to echo
...
There were a lot of places (like in help functions) that used multiple
echo calls instead of heredocs. Personal opinion but this seems cleaner.
8 years ago
Marcus Hildum
28eeaf201b
Standardize function declaration
...
There were no fewer than three styles of function declaration going
on in these files, so I attempted to standardize them to the typical
myfucn() {
}
style.
8 years ago
Dan Schaper
9a421d510a
Ignore comments in adlists.list section.
8 years ago
Dan Schaper
a9c3e2c7ba
Add log_write function. Update version_check to use logical conditionals.
8 years ago
Dan Schaper
7fcb40739d
Close IF statement
8 years ago
Dan Schaper
5a3d319677
Add fail check to dig local and remote.
8 years ago
Dan Schaper
8466d0b681
Change NSLOOKUP to dig for resolver tests, add dnsmasq specific records check
8 years ago
Dan Schaper
5de179f1eb
Remove blacklist comparison.
8 years ago
Dan Schaper
36e10595cc
Change netstat to lsof.
8 years ago
Dan Schaper
edd7f28104
Add internet checks to IP section
8 years ago
Dan Schaper
dba1ab3fc0
Remove compareWhitelist
8 years ago
Dan Schaper
3df9c48012
Include ping statistics in default gateway checks.
8 years ago
Dan Schaper
ac1c299369
Revert overzealous renaming of Pi-hole in pihole.log detection.
8 years ago
Dan Schaper
5bbb3ac49a
Standardize Pi-hole naming.
8 years ago
Dan Schaper
014bdf911a
Add open port detection
8 years ago
Dan Schaper
874853fe18
Add lighttpd to version check
8 years ago
Dan Schaper
274b71f8bc
Relocate hostname checks
8 years ago
Dan Schaper
c41d543d81
Handle lack of IPv6 gracefully.
8 years ago
Dan Schaper
7729ddab30
Mode code realignment. Handle lack of IPv6 gateway gracefully.
8 years ago
Dan Schaper
60c0e59a83
Add IPv6 intelligence to debug
8 years ago
Adam Warner
b1a7b0a186
Update piholeDebug.sh
...
I can spell, honest.
8 years ago
Promofaux
b3e7619048
curly brackets all the variables!
8 years ago
Adam Warner
95edb49bb8
Add option for uploading debug log to termbin
8 years ago
Dan Schaper
ce8f07750f
Remove trailing slash on os-release check
...
Fixes #CLOSED
Remove trailing slash that would cause an os-check to always fail out.
8 years ago
Promofaux
61ff12e8d4
Change header to match the rest of the scripts.
8 years ago
Promofaux
e942440bb7
Dan forgot this : `}`
8 years ago
Promofaux
6f068e0b9c
Replace sprunge.us with termbin, which appears to be more reliable.
8 years ago
Sander
11f2524b9b
Instead of an or, cat *release
8 years ago
Dan Schaper
b011e5f838
Add os-release check
8 years ago
Dan Schaper
f45eb84d6b
Add distribution Check
8 years ago
Daniel
9b8efe1b27
Upload log to sprunge.us
8 years ago
bcambl
27a9642090
check for sudo via 'command -v' instead of dkpg-query
8 years ago
Adam Warner
d10e9b1b6e
add pihole/webui version numbers
9 years ago
Adam Warner
a6bee76581
add location of debug log output file!
9 years ago
nate
2f4f5a6ad2
Added lighttpd error.log to debug output
9 years ago
nate
7e06769d44
Double quoting
9 years ago
nate
5347ee4896
Write verbose status of processes to debug log & Minor UI Fixes
9 years ago
nate
2625d9f7fe
Made piholeDebug.sh +x
9 years ago
nate
5f7c11f495
Sudo added to ifconfig to ensure it runs if debug not run as root
9 years ago
nate
ec4d2d65a6
PromoFaux request: Detailed adlists.list output
...
Now tells user (and logs to pihole_Debug.log) that the adlists.default file is in use
9 years ago
nate
2311b42bca
Merge branch 'ScriptCleanup-Dev'
...
Conflicts:
README.md
advanced/Scripts/blacklist.sh
advanced/Scripts/piholeDebug.sh
advanced/Scripts/whitelist.sh
automated install/basic-install.sh
gravity.sh
9 years ago
nate
6145748bfb
Change single echo to printf to forrect \t interpretation
9 years ago
nate
1a1026b367
Consistent stdout to match basic-install.sh and uninstall.sh
9 years ago
nate
a9c24b456d
Bug fixes and logging improvements
...
Finalized for production deployment. Next release targeting a tarball of config files plus additional logging.
9 years ago
nate
b4463bf42c
Added test for nslookup
...
Checks the TESTURL for nslookup is not whitelisted
9 years ago
nate
8f8dc66c70
Ignore whitespace when writing config files
9 years ago
Nate
b746250e71
Made all advanced/Scripts/ executable for consistency.
9 years ago
nate
86eafe7a33
Added comparison of gravity.list with Whitelist.txt and Blacklist.txt.
...
Added additional echos to help read the debug file.
TODO: testNslookup function
9 years ago
nate
04638c9065
Added 01-pihole.conf from /etc/dnsmasq.d/ to log
...
Write 01-pihole.conf to debug log
9 years ago
nate
b0dd231018
Modified description in header
...
Removed copied header description from piholeLogFlush.sh and replaced with relevant description.
9 years ago
nate
0b5f005a5d
Added piholeDebug.sh script for advanced debugging
...
Script piholeDebug.sh added to /usr/local/bin to generate a detailed log file for debugging/troubleshooting.
9 years ago