Files
web/php/sub.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
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;
}