changeset 10:f78173fad15f

fix input files overwritten before background task can process them
author Carl Byington <carl@five-ten-sg.com>
date Fri, 17 May 2013 13:24:37 -0700
parents 13204eef1a0a
children 1b7813f588ba
files wflogs-daemon.conf
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/wflogs-daemon.conf	Fri May 17 12:40:05 2013 -0700
+++ b/wflogs-daemon.conf	Fri May 17 13:24:37 2013 -0700
@@ -3,9 +3,9 @@
     versions 20;
     output   "/var/www/html/firewall.0fast.%d.html";
     tempin   "/var/lib/wflogs-daemon/wflogs.fast.input";
-    wflogs   "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.fast.input >%s &";
+    wflogs   "cd /var/lib/wflogs-daemon; mv -f wflogs.fast.input wflogs.fast.input.tmp; nice wflogs -i all -o html wflogs.fast.input.tmp >%s &";
     file     "/var/log/messages";
-    pattern  "vyatta kernel";
+    pattern  "rt01 kernel";
 };
 
 context hourly {
@@ -14,9 +14,9 @@
     trigger  hourly;
     output   "/var/www/html/firewall.1hourly.%d.html";
     tempin   "/var/lib/wflogs-daemon/wflogs.hourly.input";
-    wflogs   "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.hourly.input >%s &";
+    wflogs   "cd /var/lib/wflogs-daemon; mv -f wflogs.hourly.input wflogs.hourly.input.tmp; nice wflogs -i all -o html wflogs.hourly.input.tmp >%s &";
     file     "/var/log/messages";
-    pattern  "vyatta kernel";
+    pattern  "rt01 kernel";
 };
 
 context daily {
@@ -25,9 +25,9 @@
     trigger  daily;
     output   "/var/www/html/firewall.2daily.%d.html";
     tempin   "/var/lib/wflogs-daemon/wflogs.daily.input";
-    wflogs   "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.daily.input >%s &";
+    wflogs   "cd /var/lib/wflogs-daemon; mv -f wflogs.daily.input wflogs.daily.input.tmp; nice wflogs -i all -o html wflogs.daily.input.tmp >%s &";
     file     "/var/log/messages";
-    pattern  "vyatta kernel";
+    pattern  "rt01 kernel";
 };
 
 context weekly {
@@ -36,8 +36,8 @@
     trigger  weekly;
     output   "/var/www/html/firewall.3weekly.%d.html";
     tempin   "/var/lib/wflogs-daemon/wflogs.weekly.input";
-    wflogs   "nice wflogs -i all -o html /var/lib/wflogs-daemon/wflogs.weekly.input >%s &";
+    wflogs   "cd /var/lib/wflogs-daemon; mv -f wflogs.weeily.input wflogs.weekly.input.tmp; nice wflogs -i all -o html wflogs.weekly.input.tmp >%s &";
     file     "/var/log/messages";
-    pattern  "vyatta kernel";
+    pattern  "rt01 kernel";
 };