Commit graph

2863 commits

Author SHA1 Message Date
Dan Schaper
e23c6899e0 Merge pull request #1456 from WaLLy3K/patch-3
Update queryFunc() to search Whitelist
2017-05-11 03:45:40 -07:00
WaLLy3K
c35c7b2cea Wrap in double brackets 2017-05-11 20:21:23 +10:00
WaLLy3K
1c2aa44d46 Provide notice message for whitelisted sites 2017-05-11 20:10:40 +10:00
WaLLy3K
3b44a0da32 Provide error message if not found in any list 2017-05-11 20:09:00 +10:00
WaLLy3K
58353e2839 Update queryFunc() to search Whitelist
If there is a match in Whitelist/Blacklist/Wildcards, `[ ! -t 1 ]` will cause the search to end if the terminal is closed when the script is called. This has the intended effect of allowing a user to search for a W/B/W domain (as well as all the adlists it's found in) using `pihole -q` via Terminal, but the script will stop searching after a W/B/W match when called by the block page.
2017-05-11 19:58:35 +10:00
Adam Warner
5e0572637e Merge pull request #1417 from WaLLy3K/tweak/queryFunc
QueryFunc() rewrite
2017-05-11 09:07:00 +01:00
Dan Schaper
501b26decd Log and echo gateway responses 2017-05-10 22:08:06 -07:00
WaLLy3K
c6596f2c54 Modified syntax to be valid for Shellcheck 2017-05-11 14:19:13 +10:00
WaLLy3K
2863308090 Minimise string duplication & other minor changes
Instead of duplicating output strings, rewrite core/web/ftlOutput() into one neat versionOutput().
2017-05-11 13:34:58 +10:00
WaLLy3K
7fef1fdc83 Fixed indentation 2017-05-11 10:11:04 +10:00
WaLLy3K
3081c151bd Perform EXACT searches on HOSTS lists correctly
`\s` on the end may be overkill, but it is the existing scanList() behaviour.
2017-05-11 09:13:32 +10:00
Dan Schaper
c793295be0 Merge pull request #1446 from pi-hole/tweak/install_lockcheck
Clarify error message on apt failures.
2017-05-10 15:40:13 -07:00
WaLLy3K
fe0a35cc7a Update -h to work as --hash
Also provide error output as per https://github.com/pi-hole/pi-hole/pull/1447#issuecomment-300600093
2017-05-11 08:30:49 +10:00
Dan Schaper
0b67eebaec Merge pull request #1440 from pi-hole/revert-1437-blockPage
Revert "Ensure any changes to blocking page are updated."
2017-05-10 15:26:29 -07:00
WaLLy3K
03201e2f20 Display FTL version & version.sh rewrite
While testing to make sure `pihole -v` would output `pihole-FTL version`, I noticed some options didn't work how I expected them to. For example, if I use `pihole -v -p`, I would expect to see the version output of Pi-hole Core. Instead, I'm informed that it's an invalid option.

I've had the following things in mind while rewriting this:
  * I'm operating under the assumption that FTL is only installed if the Admin Console is (Line 113 exit 0)
  * I have modified the help text to only output with `pihole -v --help`
  * I have modified all output to be more similar to the output style of `grep` and `curl` (Ditching ":::")

Testing output:
```
w3k@MCT:~$ pihole -v
  Pi-hole version is v3.0.1-14-ga928cd3 (Latest: v3.0.1)
  Admin Console version is v3.0-9-g3760482 (Latest: v3.0.1)
  FTL version is v2.6.2 (Latest: v2.6.2)
w3k@MCT:~$ pihole -v -c
  Current Pi-hole version is v3.0.1-14-ga928cd3
  Current Admin Console version is v3.0-9-g3760482
  Current FTL version is v2.6.2
w3k@MCT:~$ pihole -v -l
  Latest Pi-hole version is v3.0.1
  Latest Admin Console version is v3.0.1
  Latest FTL version is v2.6.2
w3k@MCT:~$ pihole -v -p --hash
  Current Pi-hole hash is a928cd3
w3k@MCT:~$ pihole -v -a --hash
  Current Admin Console hash is 3760482
w3k@MCT:~$ pihole -v --help
Usage: pihole -v [REPO | OPTION] [OPTION]
Show Pi-hole, Web Admin & FTL versions
  <Shows all Repositories and Options>
w3k@MCT:~$ pihole -v -foo
  Invalid Option!
```
2017-05-10 13:07:56 +10:00
Dan Schaper
dfc32b26a6
We test for dpkg lock on line 830 directly, no need for the check also
in the template section.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-05-09 13:11:28 -07:00
WaLLy3K
173ad339bb Update CSS location 2017-05-08 19:33:45 +10:00
Adam Warner
89fd962615 Revert "Ensure any changes to blocking page are updated." 2017-05-06 11:45:31 +01:00
Adam Warner
a928cd3fa1 Merge pull request #1437 from pi-hole/blockPage
Ensure any changes to blocking page are updated.
2017-05-06 01:06:22 +01:00
Dan Schaper
f190a6ebc5 Merge pull request #1436 from pi-hole/fix/dhcpcd-localhostNS
Update basic-install.sh dhcpcd.conf nameserver
2017-05-05 15:25:12 -07:00
Adam Warner
9beb9fd941 Merge pull request #1384 from pi-hole/checkoutImprovements
Stash changes when switching branches
2017-05-05 23:22:54 +01:00
Adam Warner
525a1228c3
clarify 2017-05-05 22:43:37 +01:00
Adam Warner
19fd25c7cd
revert line, looks tidyer 2017-05-05 22:40:10 +01:00
Adam Warner
5b0927ca4b
tidy up output 2017-05-05 22:32:27 +01:00
Adam Warner
324d4433c3
even further simplify 2017-05-05 22:31:31 +01:00
Adam Warner
615ca56ea3
fix inteliJ IDEA complaints 2017-05-05 22:27:58 +01:00
Adam Warner
41dd163453
further simplify 2017-05-05 22:27:33 +01:00
Adam Warner
5cd2c77d98
simplify 2017-05-05 22:24:40 +01:00
Adam Warner
f270f7430c
Update block page. Allow for setupVars setting of CUSTOMBLOCKPAGE (bool) to prevent it being overwritten 2017-05-05 22:10:24 +01:00
Dan Schaper
99b23627d0 Update basic-install.sh 2017-05-05 12:03:51 -07:00
Adam Warner
26fcb1b2a0 Merge pull request #1429 from pi-hole/development
Release v3.0.1
2017-05-04 15:12:26 +01:00
DL6ER
e9c4e8123c Merge branch 'master' into development 2017-05-04 12:12:44 +02:00
Dan Schaper
a290e01bdf Merge pull request #1421 from pi-hole/fix/accidental-password-reset
Add option to enter new password as command arg
2017-05-04 03:11:54 -07:00
DL6ER
9cc392fa02
Update Marks PR after the Promo code has been merged 2017-05-04 11:43:48 +02:00
Dan Schaper
7c2046cce7 Merge pull request #1423 from pi-hole/promoLearnsToCode
Double hash the password directly in the install script
2017-05-03 12:07:38 -07:00
WaLLy3K
4d731ca30b Updated landing page location
During development, I had the location of `/pihole/index.php` as just `/index.php`. Just correcting some changes!
2017-05-03 15:33:50 +10:00
WaLLy3K
f2016f26d7 Updated splash page CSS href 2017-05-03 15:29:43 +10:00
Adam Warner
b13171cc45
$1 is not $pw. Seriously, who let me onto this project 2017-05-02 22:37:38 +01:00
Adam Warner
9c645e2010
Seriously. 2017-05-02 22:30:02 +01:00
Adam Warner
bb6f409e89
dropped a " 2017-05-02 22:28:32 +01:00
Adam Warner
61ec7723f6
use function in install script 2017-05-02 22:25:47 +01:00
Adam Warner
9c136a5579
functionise Hashing 2017-05-02 22:24:37 +01:00
Adam Warner
a5733508ae
Double hash the password directly in the install script 2017-05-02 21:36:08 +01:00
WaLLy3K
a8818c16d8 Fixed unnecessary usage of !important 2017-05-02 19:51:13 +10:00
DL6ER
c8e1e6dc8a Merge pull request #1418 from pi-hole/tweak/debug/FTL_log
Include pihole-FTL.log in debug report
2017-05-02 09:41:35 +02:00
WaLLy3K
7bcea98d0c Do not activate letsencrypt.conf if found 2017-05-02 17:28:51 +10:00
WaLLy3K
74b15d10d9 Update lighttpd.conf.fedora
Mirror changes found in `lighttpd.conf.debian`
2017-05-02 17:24:55 +10:00
WaLLy3K
356c70cdae Update lighttpd.conf.debian
* Disable `include-conf-enabled.pl`, as blindly enabling HTTPS (as Let's Encrypt does by having a file in that folder) creates Block Page inefficiencies
* Make Block page handle JS request rewrite, allowing users to better utilise their `lighttpd` service
* Make Block page handle debugging Pi-hole header
* Make Block page redirect users from `pi.hole` to `http://pi.hole/admin`
2017-05-02 17:24:07 +10:00
WaLLy3K
dfb5c37d98 Delete index.js 2017-05-02 17:21:40 +10:00
DL6ER
30dcf6ff47
Include pihole-FTL.log in debug report 2017-05-02 09:18:58 +02:00