Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for Custom block page #1688

Merged
merged 3 commits into from Sep 13, 2017

Conversation

Projects
None yet
4 participants
@PromoFaux
Copy link
Member

PromoFaux commented Sep 9, 2017

By submitting this pull request, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your PR:

Please submit all pull requests against the development branch. Failure to do so will delay or deny your request

  • I have read and understood the contributors guide.
  • I have written tests and verified that they fail without my change.
  • I have squashed any insignificant commits.
  • This change has comments for package types, values, functions, and non-obvious lines of code.
  • I am willing to help maintain this change if there are issues with it later.
  • I give this submission freely and claim no ownership. It is compatible with the EUPL 1.2 license.
  • I have Signed Off all commits. (git commit --signoff)

Please explain what you have done and wish to accomplish with this Pull Request

  1. What does this change do, exactly?
    Install script detects whether or not /var/www/html/pihole/custom.php exists, and if so, changes /etc/lighttpd/lighttpd.conf's server.error-handler-404 entry to point at that instead.

If user wishes to create custom.php post-install, then they can run pihole -r to fix their lighttpd.conf

The upshot of this, is that we can push out changes to our own default blockpage, without worrying about overwriting a user's custom page, provided their changes are kept separately in custom.php

  1. Please link to the relevant issues.

  2. Which documentation changes (if any) need to be made because of this PR?

PromoFaux added some commits Sep 9, 2017

always overwrite default blockpage, so that changes can be rolled out
Signed-off-by: Adam Warner <adamw@rner.email>
adjust lighttpd config depending on whether or not custom.php exists
Signed-off-by: Adam Warner <adamw@rner.email>
remove no longer needed tests
Signed-off-by: Adam Warner <adamw@rner.email>
@@ -189,107 +189,6 @@ def test_installPiholeWeb_fresh_install_no_errors(Pihole):
assert 'index.js' in web_directory
assert 'blockingpage.css' in web_directory

def test_installPiholeWeb_empty_directory_no_errors(Pihole):

This comment has been minimized.

@Mcat12

Mcat12 Sep 9, 2017

Member

You should keep a modified version of this first test

This comment has been minimized.

@PromoFaux

PromoFaux Sep 9, 2017

Author Member

The output will be the same no matter what at this stage, I took out the checks for that directory/the files

@Mcat12

Mcat12 approved these changes Sep 13, 2017

Copy link
Member

Mcat12 left a comment

LGTM

@PromoFaux PromoFaux merged commit 7a1df15 into development Sep 13, 2017

5 checks passed

codacy/pr Good work! A positive pull request.
Details
code-review/pullapprove Approved by Mcat12, PromoFaux
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@PromoFaux PromoFaux deleted the tweak/customBlockPage branch Sep 13, 2017

@pralor

This comment has been minimized.

Copy link

pralor commented Feb 27, 2018

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-v3-2-introduces-long-term-statistics-an-audit-log-colours-and-more/5772/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.