summaryrefslogtreecommitdiffstats
path: root/etc/inc/filter.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-01-02 18:43:19 +0000
committerErmal <eri@pfsense.org>2013-01-02 18:43:19 +0000
commit5d6495a7a4ec58d2c17b97064f82ec672428a5b6 (patch)
tree9c22ad672e80d8302ed8fd79ff2ce8debca76623 /etc/inc/filter.inc
parentb08e147f433b689870206a1b98f91d716bd13c9a (diff)
downloadpfsense-5d6495a7a4ec58d2c17b97064f82ec672428a5b6.zip
pfsense-5d6495a7a4ec58d2c17b97064f82ec672428a5b6.tar.gz
Tell filterdns to reload the config rather than restart if its running
Diffstat (limited to 'etc/inc/filter.inc')
-rw-r--r--etc/inc/filter.inc16
1 files changed, 10 insertions, 6 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 6bd77d6..81d4945 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -336,13 +336,17 @@ function filter_configure_sync($delete_states_if_needed = true) {
layer7_start_l7daemon();
if(!empty($filterdns)) {
- killbypid("{$g['tmp_path']}/filterdns.pid");
@file_put_contents("{$g['varetc_path']}/filterdns.conf", $filterdns);
- /*
- * FilterDNS has three debugging levels. The default choosen is 1.
- * Availabe are level 2 and greater then 2.
- */
- mwexec("/usr/local/sbin/filterdns -p {$g['tmp_path']}/filterdns.pid -i 300 -c {$g['varetc_path']}/filterdns.conf -d 1");
+ if (isvalidpid("{$g['tmp_path']}/filterdns.pid"))
+ sigkillbypid("{$g['tmp_path']}/filterdns.pid", "HUP");
+ else {
+ killbypid("{$g['tmp_path']}/filterdns.pid");
+ /*
+ * FilterDNS has three debugging levels. The default choosen is 1.
+ * Availabe are level 2 and greater then 2.
+ */
+ mwexec("/usr/local/sbin/filterdns -p {$g['tmp_path']}/filterdns.pid -i 300 -c {$g['varetc_path']}/filterdns.conf -d 1");
+ }
}
/* run items scheduled for after filter configure run */
OpenPOWER on IntegriCloud