mirror of
https://github.com/pi-hole/web.git
synced 2026-02-24 11:46:02 +00:00
Updates from using `whitelist.sh` and `blacklist.sh` to using `pihole`. Currently includes sudo in command, but after the scripts get updated with sudo checking that should not be needed.
13 lines
265 B
PHP
13 lines
265 B
PHP
<?php
|
|
if(!isset($_GET['domain'], $_GET['list']))
|
|
die();
|
|
|
|
switch($_GET['list']) {
|
|
case "white":
|
|
exec("sudo pihole -w -q -d ${_GET['domain']}");
|
|
break;
|
|
case "black":
|
|
exec("sudo pihole -b -q -d ${_GET['domain']}");
|
|
break;
|
|
}
|