1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

replace blocklist dest w/ constant

This commit is contained in:
billz 2020-03-27 22:05:10 +00:00
parent ffbd99414e
commit 1103401fe0

View File

@ -6,7 +6,6 @@ require_once '../../includes/config.php';
if (isset($_POST['blocklist_id'])) { if (isset($_POST['blocklist_id'])) {
$blocklist_id = $_POST['blocklist_id']; $blocklist_id = $_POST['blocklist_id'];
$notracking_url = "https://raw.githubusercontent.com/notracking/hosts-blocklists/master/"; $notracking_url = "https://raw.githubusercontent.com/notracking/hosts-blocklists/master/";
$blocklist_dest = "/etc/raspap/adblock/";
switch ($blocklist_id) { switch ($blocklist_id) {
case "notracking-hostnames": case "notracking-hostnames":
@ -18,7 +17,7 @@ if (isset($_POST['blocklist_id'])) {
} }
$blocklist = $notracking_url . $file; $blocklist = $notracking_url . $file;
exec("sudo /etc/raspap/adblock/update_blocklist.sh $blocklist $file $blocklist_dest", $return); exec("sudo /etc/raspap/adblock/update_blocklist.sh $blocklist $file " .RASPI_ADBLOCK_LISTPATH, $return);
$jsonData = ['return'=>$return]; $jsonData = ['return'=>$return];
echo json_encode($jsonData); echo json_encode($jsonData);
} }