Commit graph

41 commits

Author SHA1 Message Date
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
Adam Warner
4300759287 Fix logic. If both v6 and v4 divide by two, else dont. 2016-11-03 08:01:25 +00:00
Promofaux
d7d6d6f991 Update to use new Var name 2016-11-02 21:46:30 +00:00
Jacob Salmela
f8e9726922 source setupVars and check for the correct variable 2016-11-01 19:01:48 -05:00
Jacob Salmela
884363bd05 remove ipv6 check since it's already in setupVars 2016-11-01 19:01:28 -05:00
Marcus Hildum
6e94bf5b6d Consistency
You know the drill
2016-10-22 00:14:38 -07:00
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.
2016-10-19 20:46:37 -07:00
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.
2016-10-19 19:47:45 -07:00
Promofaux
090fbd04af Remove ${SUDO} usages and root checks from scripts called by pihole command as they should not be called directly. 2016-10-15 17:54:04 +01:00
Promofaux
b3e7619048 curly brackets all the variables! 2016-08-21 02:12:02 +01:00
Carter Maxwell
c0e1772e21 Replace toilet with echo 2016-05-07 11:44:18 -07:00
Promofaux
05e0003555 Fixes issue #453 2016-04-10 21:17:58 +01:00
nate
1a2046a7eb Added uninstall option to pihole command. Minor fixes 2016-04-02 19:20:54 -05:00
nate
fee55fa642 Added gravity.sh to the list of options 2016-03-28 18:37:49 -05:00
nate
76ea1962be Controller script, pihole.sh added
Syntax changes for user output to be consistent
2016-03-28 18:31:21 -05:00
nate
8ef4c12f97 Merge branch 'ScriptCleanup'
Conflicts:
	README.md
	advanced/Scripts/blacklist.sh
	advanced/Scripts/whitelist.sh
	automated install/basic-install.sh
	gravity.sh
2016-03-28 12:21:18 -05:00
nate
0b9e78df2c Cleaned code and added prompt for purge on uninstall 2016-03-26 16:57:01 -05:00
Morlok8k
d13ae0610e fix for older versions of uptime, on development branch. 2016-03-08 10:19:01 -08:00
Carter Maxwell
a6877e7c13 remove trailing whitespace chronometer.sh 2016-03-05 21:15:11 -08:00
Hippyjake
21c688a8a8 add uptime -p to chrono script 2016-02-16 18:06:49 -07:00
Promofaux
4c24186911 Fixes divide by zero error. 2016-02-14 02:58:09 +00:00
Mcat12
48f9a61ff0 Updated License 2016-01-30 15:12:40 -05:00
Promofaux
af982a02af Move call to CheckIPv6 function into CalcBlockedDomains, rather than relying on remembering to call it before you call CalcBlockedDomains. 2016-01-19 21:14:01 +00:00
Adam Warner
f665899116 Update chronometer.sh
weirdness
2016-01-18 23:35:21 +00:00
Adam Warner
de464e17cc Update chronometer.sh
Note to self, Find&Replace>Replace All is a bad idea.
2016-01-18 22:24:02 +00:00
Adam Warner
0eed56380d Update chronometer.sh
What, me? Reference the wrong file?
2016-01-18 22:15:39 +00:00
Promofaux
487c26db44 Major overhaul. Added -j option to output stats as JSON formatted string. If run with no option, then chronometer runs as normal. Fixed calculations to match those on the web dashboard. 2016-01-18 22:03:53 +00:00
Dan Schaper
cb91b8f5fa Add copyright headers 2015-12-06 05:55:50 -08:00
Fourdee
52ef76d717 missed a few more /etc/host changes 2015-07-30 18:10:26 +01:00
Dan
024395b73b Update chronometer.sh
Missed a change todaysAdsEliminated to /\/etc\/pihole\/gravity.list/
2015-07-30 18:01:10 +01:00
Fourdee
9d99a4ef36 Patch 3 - Dont use /etc/hosts
/etc/pihole/gravity.list now stores the block list. Ensures the
/etc/hosts file is left untouched.
2015-07-30 17:24:24 +01:00
Dan
9627b27f15 pihole logfile changes
https://github.com/jacobsalmela/pi-hole/pull/27
2015-07-29 12:22:28 +01:00
jacobsalmela
11614263b8 better version of LCD display stats 2015-07-25 13:05:13 -05:00
jacobsalmela
fd2b24f2a0 preparing files for merge and for testing automated install
I haven't merged anything before, so hopefully, I won't mess it up too
bad!
2015-06-16 11:15:15 -05:00
Renamed from advanced/chronometer.sh (Browse further)