Commit 6f29ede3 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(legacy) whitespace rc.update_urltables

(cherry picked from commit 6b18b3ec)
parent 07a1ac20
......@@ -41,10 +41,11 @@ if (count($todo) > 0) {
if ($r == 1) {
$result = "";
// TODO: Change it when pf supports tables with ports
if ($t['type'] == "urltable")
if ($t['type'] == "urltable") {
exec("/sbin/pfctl -t " . escapeshellarg($t['name']) . " -T replace -f /var/db/aliastables/" . escapeshellarg($t['name']) . ".txt 2>&1", $result);
else
} else {
$filter_reload = true;
}
log_error("{$argv[0]}: Updated {$t['name']} content from {$t['url']}: {$result[0]}");
} elseif ($r == -1) {
log_error("{$argv[0]}: {$t['name']} does not need updating.");
......@@ -53,6 +54,7 @@ if (count($todo) > 0) {
}
}
if ($filter_reload)
if ($filter_reload) {
configd_run("filter reload");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment