replace blocklist dest w/ constant

This commit is contained in:
billz 2020-03-27 22:05:10 +00:00
parent ffbd99414e
commit 1103401fe0
1 changed files with 1 additions and 2 deletions

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);
} }