From ff46cd46c70f00d65b063ecce8a9cace31f46d76 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 6 Jul 2007 18:30:31 +0000 Subject: [PATCH] Restart filter logging process after timezone change so that the entries reflect the correct time and date. --- usr/local/www/system.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/usr/local/www/system.php b/usr/local/www/system.php index 34d871be7e..f5bbe3292e 100755 --- a/usr/local/www/system.php +++ b/usr/local/www/system.php @@ -62,6 +62,17 @@ function is_timezone($elt) { return !preg_match("/\/$/", $elt); } +if($pconfig['timezone'] <> $_POST['timezone']) { + /* restart firewall log dumper helper */ + require_once("functions.inc"); + $pid = `ps awwwux | grep -v "grep" | grep "tcpdump -vv -l -n -e -ttt -i pflog0" | awk '{ print $2 }'`; + if($pid) { + mwexec("kill $pid"); + usleep(1000); + } + filter_pflog_start(); +} + exec('/usr/bin/tar -tzf /usr/share/zoneinfo.tgz', $timezonelist); $timezonelist = array_filter($timezonelist, 'is_timezone'); sort($timezonelist);