mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
4dff31a6de
- Accessed under the "Whitelist" tab - Added "Add: " in front of the text box for the simple whitelist - Added "ad.example.com" as a placeholder in the text box Currently www-data needs root access to gravity.sh (for adding to the blacklist). If we get a blacklist.sh, we may be able to get rid of the need for root.
10 lines
284 B
PHP
10 lines
284 B
PHP
<?php
|
|
if(!isset($_GET['domain'], $_GET['list']))
|
|
return;
|
|
|
|
if($_GET['list'] == "white")
|
|
exec("/usr/local/bin/whitelist.sh ${_GET['domain']}");
|
|
else {
|
|
exec("echo '${_GET['domain']}' | sudo tee -a /etc/pihole/blacklist.txt");
|
|
exec("/usr/local/bin/gravity.sh");
|
|
} |