Commit graph

307 commits

Author SHA1 Message Date
Adam Warner
d0e250a616
Ensure pihole-FTL.conf is parsed, as well as external.conf for lighttpd, to rule out any custom modifications.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-21 22:25:00 +01:00
Adam Warner
b2ba55c27b
Show details of any remotes on the git repositories
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-21 21:23:26 +01:00
Adam Warner
9e96ff37de
Fix merge conflicts
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-12 22:16:43 +01:00
DL6ER
ddb354f78b
Add enable indentation for the domainlist
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-04-29 06:23:29 +02:00
DL6ER
20ef5e0264
Show associated group IDs in domains/clients/adlists listing. We get the data through a LEFT JOIN followed by a GROUPing by the left list ID and finialized through a GROUP_CONCATenation.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-04-24 10:33:46 +02:00
DL6ER
ad5802715e
enabled field: Center 0, right-align 1
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-04-23 15:16:48 +02:00
DL6ER
63f6c6a894
Add indentation for enabled and type fields
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-04-23 10:01:22 +02:00
XhmikosR
7b8611ced0
Assorted typo fixes. (#3126)
* Assorted typo fixes.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>

Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
2020-03-08 16:53:14 -07:00
DL6ER
497bfd80a5
Update development from release/v5.0 (#3200)
* Use bash regex instead of awk.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>

* Fix incorrect type description. (#3201)

Signed-off-by: DL6ER <dl6er@dl6er.de>

Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
2020-03-08 16:38:53 -07:00
DL6ER
22ce5c0d70
Fix incorrect type description. (#3201)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-03-08 16:32:37 -07:00
Adam Warner
8ecaaba247
Compare daemons to expected results. (#3158) (#3159)
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>

Co-authored-by: Dan Schaper <dan@glacialmagma.com>
2020-02-24 18:00:19 +00:00
Dan Schaper
c5c414a7a2
Stickler Lint - quote to prevent splitting
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2020-02-16 19:24:05 -08:00
DL6ER
d0e29ab7b0 Add human-readable output of time of the last gravity run.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-02-16 17:43:54 -08:00
DL6ER
714a79ffce Migrate debugger to domainlist and add printing of client table.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-02-16 17:43:54 -08:00
DL6ER
cd3ad0bdc7 Show info table instead of counting domains to speed up the debugging process on low-end hardware drastically.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-02-16 17:43:54 -08:00
DL6ER
3f9e79f152
Print human-readable timestamps in the debugger's gravity output
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-01-20 20:13:44 +01:00
DL6ER
6faddfcd3d
Print timestamps in local time zone of the Pi-hole.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-23 10:09:52 +02:00
DL6ER
1820c2c598
Merge branch 'development' into new/whitelist-regex-support
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-22 14:19:51 +02:00
DL6ER
b1838512b2
Explicitly select columns (and their order) when listing the databaes tables. Print timestamps translated to strings instead of printing the integer timestamps.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-22 13:39:58 +02:00
DL6ER
3e78ed95d4
Fix displaying options for table "group" in the debugger.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-17 15:04:04 +02:00
DL6ER
dc93462d42
Group table has only two columns
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-06 20:28:00 +02:00
DL6ER
af754e3fc4
Rearrange group tables directly next to the tables they refer to.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-05 21:08:36 +02:00
DL6ER
06860ed5b4
Group tables have only two columns.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-05 21:07:39 +02:00
DL6ER
0d28dce326
Print group table contents in debug log.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-22 20:18:15 +02:00
DL6ER
87f75c737a
Review comments.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-10 12:00:38 +02:00
Mcat12
b154dd5f07
Quote calls to read FTL config
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-07-08 19:48:50 -07:00
DL6ER
054c7a2c05
Create new table + view regex_whitelist + rename old regex table to regex_blacklist. This updates the gravity.db version to 3.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-08 21:35:31 +02:00
Mcat12
e8e5d4afda
Get file locations of FTL files from the config
Instead of hardcoding the location of certain FTL files (`gravity.db`,
`pihole-FTL.log`), read the configured location from FTL's config. The
default location is used if no custom location has been configured.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-07-07 18:10:39 -07:00
DL6ER
1fe3507bc5
Adlists table was renamed to Adlist. Adapt further places in the code to match the new name.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-03 07:56:10 +02:00
Mcat12
bfb99c361c
Note that the gravity size does not include the blacklist entries
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-05-21 17:12:47 -07:00
Mcat12
5796054305
Increase ID column width to 4
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-05-20 21:59:18 -07:00
Mcat12
a3e1473ac1
Set explicit column widths to prevent text from getting cut off
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-05-20 21:33:09 -07:00
Mcat12
7b5fc60e00
Improve table formatting
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-05-20 21:20:38 -07:00
Mcat12
807ce0af4e
Show whitelist, blacklist, and regexlist details
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-05-20 21:15:22 -07:00
Mcat12
3f05efd60f
Add extra newline
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-05-20 21:02:31 -07:00
Mcat12
03d93aa19a
Update debug script with gravity DB changes
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-05-20 20:58:57 -07:00
Dan Schaper
5532df24e4
Pi-hole Debug - tricorder upload function calls
Fix tricorder upload function calls to use new curl function.
2019-05-03 02:46:27 -07:00
Dan Schaper
71cd6c137b Use curl instead of openssl for transmission of unmodified
log file. We want ansi color codes to be sent.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2019-02-23 04:13:44 -08:00
Adam Warner
a145f1d931
Be more verbose with debug script output
If output of `git status -s` is non-null display changes
if output of `git diff` is non-null, display diff

Signed-off-by: Adam Warner <adamw@rner.email>
2019-02-18 22:32:53 +00:00
Mcat12
26f2410fe6
Change /var/run/shm to /dev/shm
The /var directory may not exist (does not exist on Fedora 29), and is
simply a symlink to /dev/shm.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-02-02 10:37:12 -08:00
DL6ER
5ffc8c7443
List content of /var/run/shm in debugger
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-01-01 17:56:02 +01:00
Mcat12
9d59da8974
Remove dnsmasq checks from debugger
This also fixes an issue where the port checks weren't running
(`compare_port_to_service_assigned`).

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-08 21:51:21 -05:00
Mark Drobnak
bbb759c684
Merge pull request #2477 from bcambl/debug_init_service_check
fix debug service check via sysvinit
2018-11-07 17:50:32 -05:00
Adam Warner
d57f9906bd
read -r -a, not read -a -r
Signed-off-by: Adam Warner <adamw@rner.email>
2018-10-26 19:24:43 +01:00
bcambl
3ec84553ef fix debug service check via sysvinit
Signed-off-by: bcambl <blayne@blaynecampbell.com>
2018-10-24 10:06:11 -06:00
mrmajik45
0f509f4a34
Update piholeDebug.sh 2018-09-28 17:22:31 -04:00
mrmajik45
00f98543ad
read without -r will mangle backslashes. 2018-09-26 10:32:22 -04:00
Mcat12
03e5a78d8f
Merge remote-tracking branch 'origin/FTLDNS' into development
# Conflicts:
#	advanced/Scripts/piholeDebug.sh
2018-07-22 15:18:26 -04:00
Dan Schaper
ba7782f867
Space/Tab piholeDebug.sh
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-07-20 15:25:35 -07:00
Mcat12
868948509a
Split declaration and assignment of random_url
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-06-20 20:30:42 -04:00
Mark Drobnak
e71492a2b3
Update debug script for simple list format
Gravity is now just a list of domains, not IP addresses and domains separated by a space.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-06-20 20:29:32 -04:00
Mark Drobnak
9fd70cbdf9
Merge pull request #2057 from pi-hole/fix/debug-empty-ports
debug script: fix empty ports on some systems
2018-05-30 21:48:53 -04:00
Mark Drobnak
f568012b9d
Merge pull request #2070 from pi-hole/new/debug-locale
Get user locale when debugging
2018-05-14 16:43:05 -04:00
Adam Warner
6977f655e3
fix a typo
comment out some unused variables, but not deleting them in case there is a plan for them in future...

Signed-off-by: Adam Warner <adamw@rner.email>
2018-04-15 22:08:55 +01:00
Adam Warner
e6fc9dc75d
disable 2016 in two places and declare local variables
Signed-off-by: Adam Warner <adamw@rner.email>
2018-04-15 22:00:14 +01:00
Adam Warner
b57b3f4588
Disable SC2001 for generation of the_os
Signed-off-by: Adam Warner <adamw@rner.email>
2018-04-15 21:36:50 +01:00
Adam Warner
776ae92416
fix some shellcheck/stickler compaints in debug script
Signed-off-by: Adam Warner <adamw@rner.email>
2018-04-15 21:33:10 +01:00
Mark Drobnak
d4870b3854
Merge pull request #2053 from pi-hole/tweak/debug-logs
Get head and tail of pihole-FTL.log during debug process
2018-04-15 14:23:25 -04:00
Jacob Salmela
5ffc3561ed
implement dschapers suggestions--better command, less subshells, and finer formatting
Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>
2018-04-11 20:35:51 -05:00
Dan Schaper
250b445eee
Split declaration and population for stickler.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-04-10 21:37:04 -07:00
Mark Drobnak
bb9a18ef08
Merge pull request #1987 from ryanknapper/patch-1
Proper output for debug CPU detection
2018-04-02 00:00:14 -04:00
Jacob Salmela
1a275ba184
debug user locale; improve function to parse variables and files
Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>
2018-04-01 06:40:48 -05:00
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>
2018-03-25 21:27:40 -05:00
Jacob Salmela
143e75d213
fix empty ports on some systems
Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>
2018-03-25 09:39:29 -05:00
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>
2018-03-23 06:56:40 -05:00
Jacob Salmela
7159ecb632
reduce ping times for faster script completion
Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>
2018-03-23 00:11:21 -05:00
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>
2018-02-19 10:22:28 -05:00
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))
2018-01-12 02:17:31 +02:00
Adam Warner
8e0d76b63b
initiated -> initialized
Signed-off-by: Adam Warner <adamw@rner.email>
2017-12-24 13:26:32 +00:00
Jacob Salmela
28bed0041e
remove comment
Signed-off-by: Jacob Salmela <github@decoy.email>
2017-12-08 18:29:28 -06:00
Jacob Salmela
6f03e30151
fixes #1537 by checking if systemctl is found
Signed-off-by: Jacob Salmela <github@decoy.email>
2017-12-08 18:23:55 -06:00
Adam Warner
a9a40ca46c
Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
Signed-off-by: Adam Warner <adamw@rner.email>
2017-12-06 23:27:40 +00:00
bcambl
0f868f7649 remove un-used DONE variable
(still available via sourced COL_TABLE on line 29)
2017-10-19 22:57:07 -06:00
bcambl
31730e7197 add missing colors to COL_TABLE fallback 2017-10-13 09:14:19 -06:00
bcambl
7d76db00ac update 'SELinux not detected' message 2017-10-13 08:58:35 -06:00
bcambl
8aceb8bf53 replace deprecated colors in debug script
- COL_LIGHT_GREEN  -> COL_GREEN
 - COL_LIGHT_RED    -> COL_RED
 - COL_LIGHT_PURPLE -> COL_PURPLE
2017-10-12 23:33:28 -06:00
bcambl
a17d1be7a4 simplify selinux debug variables 2017-10-12 23:24:02 -06:00
bcambl
1e6cc63abe add SELinux checking to debug script 2017-10-12 20:55:14 -06:00
Adam Warner
7d56e2a937
FTL has an L in it, innit?
Signed-off-by: Adam Warner <adamw@rner.email>
2017-07-14 20:54:41 +01:00
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
2017-07-14 16:53:45 +01:00
Jacob Salmela
05a724afae
codacy appeasement: remove useless cats 2017-06-29 11:49:28 -05:00
Jacob Salmela
1957b002bc
add comments about X-Headers and further explain the file descriptor cod. 2017-06-29 11:37:58 -05:00
Jacob Salmela
04cef25add
remove color character codes before uploading so the log is more readable on our plaintext tricorder server 2017-06-29 11:17:19 -05:00
Jacob Salmela
22fac5e1e0
additional shellcheck fixes 2017-06-26 22:03:45 -05:00
Jacob Salmela
b6a2a4ad5a
more shellcheck fixes 2017-06-26 21:51:41 -05:00
Jacob Salmela
5f00347019
appease shellcheck by removing two unneccesary functions and making some if/else blocks 2017-06-26 21:34:39 -05:00
Jacob Salmela
fc0440546f
add functions to parse head and tails of gravity.list and pihole.log 2017-06-10 23:20:27 -05:00
Jacob Salmela
172b8d2427
parse ftl log 2017-06-10 22:18:33 -05:00
Jacob Salmela
6d10a498a5
implement a limit on how many lines of a file we want to view 2017-06-10 21:57:17 -05:00
Jacob Salmela
881819ed5f
ignore big files we dont need to know about; also fix diagnosing pihole processes 2017-06-10 18:37:28 -05:00
Jacob Salmela
3275c5f710
more comments to help understand the script 2017-06-10 15:54:27 -05:00
Jacob Salmela
b0cc1a38c3
adjust minor formatting for better readability 2017-06-10 15:28:04 -05:00
Jacob Salmela
e10182c839
only parse files required by Pi-hole 2017-06-10 12:27:05 -05:00
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 2017-06-09 23:22:37 -05:00
Jacob Salmela
64171fa2a1
small color and formatting changes 2017-06-09 15:42:54 -05:00
Jacob Salmela
048eacd305
parse array in correct location 2017-06-07 12:31:08 -05:00
Jacob Salmela
24aa72c19d
condense repetative code into functions; parse the content of each file 2017-06-07 12:25:00 -05:00
Jacob Salmela
92b5fe4be4
check arch compatibility and add gateway faq url 2017-06-05 14:55:58 -05:00
Jacob Salmela
8b4c0b456b
exclude webpassword from being uploaded. also check that the IP addresses detected match those defined in setupVars.conf 2017-06-01 01:15:11 -05:00
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. 2017-06-01 00:19:15 -05:00