Commit graph

59 commits

Author SHA1 Message Date
Adam Warner
8ad116fe7b Aiming to get whitelist.sh to run either standalone or to be called from gravity.sh. Initial commit 2016-01-15 14:17:55 +00:00
Jacob Salmela
57282cfe16 ugly hack to whitelist from the Web interface
I wanted the whitelist feature to keep the user on the same page
without having to reload it.  I'm sure someone better versed in PHP
could eliminate the need for this hack.  Nonetheless, it works.

www-data runs the script if executed from the Web interface.  www-data
also needs access to write to /etc/pihole/gravity.list to actually
remove the domain.  So a few more things need to happen before this
will fully work.

The changes in this script won't change what is displayed if run from
the terminal, but will help when it needs to be run from the Web
interface, so I am just committing this now.

The only other thing I would like to see would be a progress spinner,
but my Web skills still need some work...
2015-12-09 15:16:34 -06:00
Dan Schaper
cb91b8f5fa Add copyright headers 2015-12-06 05:55:50 -08:00
Jacob Salmela
831322b8b2 replace file paths with variables 2015-11-27 18:38:33 -06:00
Jacob Salmela
573c1ef94f double bracket notation 2015-11-27 18:34:02 -06:00
Jacob Salmela
a2cddda590 if whitelist.txt doesn't exist, create it 2015-11-27 18:29:44 -06:00
Nathan Jones
deb48c124f Improve whitelisting script
Match domain exactly instead of partially.
Gather list of domains to minimize number of times that hosts file must be enumerated.
Only add domain to whitelist if it isn't already present.
2015-10-25 16:53:20 -07:00
Fourdee
52ef76d717 missed a few more /etc/host changes 2015-07-30 18:10:26 +01:00
jacobsalmela
9a2862de62 closes #24 whitelist without running gravity.sh
It's pretty slow because /etc/hosts is so large, but it works.  You can
add any number of domains as arguments and it will search for and
remove each one.

Maybe someone smarter knows how to make it faster...
2015-07-18 09:39:18 -05:00