Files
web/php/add.php
Mcat12 b3d3e151e0 Update list editing commands
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.
2016-04-18 22:23:43 -04:00

13 lines
259 B
PHP

<?php
if(!isset($_GET['domain'], $_GET['list']))
die();
switch($_GET['list']) {
case "white":
exec("sudo pihole -w -q ${_GET['domain']}");
break;
case "black":
exec("sudo pihole -b -q ${_GET['domain']}");
break;
}