Commit graph

83 commits

Author SHA1 Message Date
Christian König
81698ef1ed
Fix Pi-hole status in chronometer
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-01-05 21:09:57 +01:00
jbzdarkid
bc8150adfa Clean up bash script formatting
Done with the help of beautysh (a python-based bash formatter)

Signed-off-by: jbzdarkid <jbzdarkid@gmail.com>
2021-11-25 14:12:09 -08:00
DL6ER
58905a1188
Modify debugger to test name resolution on all available interfaces
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-04-16 12:14:05 +02:00
freddii
7c0c30fb0b fixed typos 2021-01-19 19:33:38 +01:00
DL6ER
e033ee6664
Fix connection mechanism between Chronometer and FTL
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-12-29 10:29:02 +01:00
Adam Warner
357b6702ec
Update advanced/Scripts/chronometer.sh
Co-authored-by: DL6ER <DL6ER@users.noreply.github.com>
2020-12-11 12:30:52 +00:00
Reto Gantenbein
e841347057 Fix chronometer output if web interface is not installed
Signed-off-by: Reto Gantenbein <reto.gantenbein@linuxmonk.ch>
2020-12-05 02:55:55 +01:00
Samuel Boucher
d4dd446ba3 Update advanced/Scripts/chronometer.sh
Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
Signed-off-by: Samuel Boucher <scboucher@users.noreply.github.com>
2020-08-09 17:12:20 -04:00
Samuel Boucher
8b4921405a Upercase the temp_unit
Signed-off-by: Samuel Boucher <scboucher@users.noreply.github.com>
2020-08-09 15:09:49 -04:00
XhmikosR
7579ab178a Update links
* use https when possible
* replace coverage with a link to the docs page in README.md
* remove obsolete affiliate link in README.md

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-30 21:50:16 +03:00
MichaIng
5c17e41cf1 Start pihole-FTL after network
"$network" on a systemd-driven OS leads to "After=network-online.target" in the generated systemd unit.
This target is no guarantee that all network interfaces have been fully configured, as it depends on the related network services types, but at least it reduces the risk that those have not fully finished their job when pihole-FTL starts. If this is the case, certain issues can occur:
- https://github.com/pi-hole/pi-hole/issues/2924
- https://discourse.pi-hole.net/t/have-to-pihole-restartdns-after-reboot/28772

Runtime files are now consistently created in "/run" instead of "/var/run". The second is a symlink to the first for backwards compatibility but on none-ancient distro versions one should use "/run", systemd even prints a warnings if service files use "/var/run". The service file used "/run" and "/var/run" both, in cases for the same files/directories before, which does not directly cause issues currently, due to the symlink, but is inconsistent at best.

Signed-off-by: MichaIng <micha@dietpi.com>
2020-05-16 13:38:18 +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
Mcat12
b320e74921
Improve argument handling
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-04-27 14:05:04 -07:00
Mcat12
add5e4ca5e
Explicitly allow only -r and --refresh in argument handler
It is already checked, but this make the code explicit.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-04-27 13:39:44 -07:00
Mcat12
422680ee9f
Fix chronometer refresh incorrectly reading the long argument sleep time
`-r` worked, but `--refresh` did not.

Fixes #2703

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-04-14 13:03:25 -07:00
WaLLy3K
24e1dc92ba
Resolve issue #2428
Signed-off-by: WaLLy3K <wally3k@pi-hole.net>
2018-09-28 10:34:49 +10:00
Mark Drobnak
dac27f1f18
Only get the first gateway for chronometer
Signed-off-by: Mark Drobnak <mark.drobnak@gmail.com>
2018-09-09 15:12:48 -04:00
Mark Drobnak
6f276ae4bb
Merge pull request #2299 from nullr0ute/net-tools
Use ip route rather than old net-tools route in  chronometer.sh
2018-09-09 15:11:19 -04:00
WaLLy3K
eef948d797
Fix header newlines
* Added \\n to each $xxx_ver_str, resolving issue #2325

Signed-off-by: WaLLy3K <wally3k@pi-hole.net>
2018-08-07 10:45:30 +10:00
Peter Robinson
45521b377a Use ip route rather than old net-tools route in chronometer.sh
The only use of net-tools is the use of route in chronometer.sh so
instead use the same method as used in piholeDebug.sh to get the
default gateway so there's no need to depend on net-tools anylonger.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2018-07-26 17:46:51 +01:00
Dan Schaper
d251bbbb05
Space/Tab chronometer.sh
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-07-20 12:29:09 -07:00
Perflyst
3390fbf238 Add RaspberryPi 3B+
Signed-off-by: Perflyst <mail@perflyst.de>
2018-03-27 12:23:01 +02:00
DL6ER
afa2e9c2f7
Exchange hard-coded domain "localhost" by hard-coded address "127.0.0.1"
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-12-30 17:44:59 +01:00
WaLLy3K
2390b80359 Silence non-numeric domains_being_blocked output
* Round $cpu_mhz to 1 decimal place
* Remove ".0" from $cpu_freq
* Silence non-numeric domains_being_blocked output
* Use "Core" and "Web" as appropriate

Signed off by WaLLy3K <wally3k@pi-hole.net>
2017-10-25 21:04:43 +11:00
WaLLy3K
714fd93292 Provide correct FTL stats (#1619)
* Provide correct FTL stats

* Use the correct lines in the array when displaying FTL stats
* Treat ads_blocked_today/dns_queries_today as currency, like domains_being_blocked is on large screens

* Chronometer Shellcheck validation

* Remove unnecessary \ from CPU usage readout
2017-07-25 23:03:23 +01:00
WaLLy3K
1bebcef265 Make Chronometer usable on smaller screens (#1518) 2017-07-04 13:52:51 +10:00
WaLLy3K
10139241f5 Fix output IPv4 addr when removing CIDR notation (#1498) 2017-05-26 09:57:27 +02:00
WaLLy3K
4ad0cdf5d4 Rewrite Chronometer to output more stats 2017-05-25 01:03:13 +10:00
WaLLy3K
b721ed49ab Update Help Output (#1467)
* File consistency

* Tabs to 2 spaces
* Corrected indenting
* Double braced conditionals
* Quoted variables within conditionals

* Standardise core help text

* Added help text for disable command
* Added help text for logging command

* Clean up

* Fixed certain new lines and spaces

* Sync with development branch

* Formatting consistency

* Tabs to 2 spaces
* Corrected indenting
* Double braced conditionals
* Quoted variables within conditionals
* Fixed certain newlines and spaces

* Admin help text

* Added help text for interface command

* Sync with development branch

* Formatting consistency

* Tabs to 2 spaces
* Fixed some wording
* Fixed certain spaces

* Formatting consistency

* Minor wording changes
* Tabs to 2 spaces
* Corrected indenting
* Double braced conditionals
* Quoted variables within conditionals
* Fixed certain newlines and spaces

* Blacklist help text

* Formatting consistency

* Tabs to 2 spaces
* Corrected indenting

* Cronometer help text

* Formatting consistency

* Fixed certain newlines and spaces
* Corrected indenting

* Checkout warning alteration

* Add checkout help text

* Corrected help output
2017-05-14 11:11:44 +10:00
DL6ER
8235b18854
Remove duplicated line 2017-03-08 12:09:34 +01:00
DL6ER
10bc8414b9
Move FTL querying before clearing the terminal to avoid flashing on Pi B+ 2017-03-07 18:10:05 +01:00
DL6ER
4e25e0dc5c
Add missing } to JSON output 2017-03-07 17:57:57 +01:00
DL6ER
b1a9793d94
Let Chronometer query all data from FTL (no need for having the API). Fixes #1305 2017-03-07 17:54:11 +01:00
DL6ER
f1b8abf503 Merge pull request #1146 from pi-hole/tweak/chronometer_recentlyblocked
[FTL] Show most recently blocked domain in chronometer
2017-03-03 12:20:43 +01:00
Jacob Salmela
7a1a2dec67
update license to EUPL on core files 2017-02-22 11:55:20 -06:00
Mcat12
f8944177a0 Fix chronometer interpreting summaryRaw 2017-01-29 13:32:48 -05:00
Mcat12
58f3ff69d8 Align comment with referenced line 2017-01-16 18:51:13 -05:00
DL6ER
72d8d10e64
Show most recently blocked domain in chronometer (using FTL). Fixes #717 2017-01-16 22:39:58 +01:00
DL6ER
845d8c0e63
Ensure LC_NUMERIC=C is set when evaluating floating point number (non-English systems might expect "," as decimal separator 2017-01-13 12:59:49 +01:00
Promofaux
b4c32e47c6 Missed one! 2017-01-12 22:07:07 +00:00
Promofaux
248d8680f7 actual codacy complaints 2017-01-12 21:51:10 +00:00
Promofaux
1bda965a7c Codacy complaints 2017-01-12 21:50:16 +00:00
Promofaux
2ee305769d Replace all calculations with values read directly web admin API. Parse JSON using native unix tools, no additional requirements needed. 2017-01-12 21:23:58 +00:00
DL6ER
a4f58b0a22
Look for "query[" instead of "query" to avoid false-positives, like listed below
root@raspberrypi:/etc/.pihole# grep 'query' /var/log/pihole.log | grep -v 'query\['
Dec 22 16:29:50 dnsmasq[30801]: forwarded code.jquery.com to 208.67.222.222
Dec 22 16:29:50 dnsmasq[30801]: reply code.jquery.com is <CNAME>
Dec 22 16:29:50 dnsmasq[30801]: reply code.jquery.netdna-cdn.com is 94.31.29.54
Dec 22 16:29:50 dnsmasq[30801]: reply code.jquery.netdna-cdn.com is 23.111.11.3
Dec 22 16:29:50 dnsmasq[30801]: reply code.jquery.netdna-cdn.com is 198.232.125.113
2016-12-22 19:09:37 +01:00
DL6ER
bcf8139708
Removed cat where we don't need it 2016-12-22 18:55:14 +01:00
DL6ER
9b0390c9da
Space to Tab 2016-12-22 18:53:44 +01:00
DL6ER
e88f58c34e
Remove grpping for today's log entries, because we flush the log every day 2016-12-22 18:45:53 +01:00
Dan Schaper
925c80edd4
Catch more 1's
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-01 15:10:06 -08:00
Jacob Salmela
ca56ca5bd8 promo-tweak
Better logic introduced by @PromoFaux
2016-11-06 11:16:48 -06:00
Jacob Salmela
a0f0dff88e replace hardcoded interface with var
setupVars.conf is already sourced, so we just need to replace the
hardcoded value with the variable name.
2016-11-06 08:18:57 -06:00