From 2415dea5aa5ecc1542b3da7795c0b7c49b98f259 Mon Sep 17 00:00:00 2001
From: James Davidson <james.davidson@vyatta.com>
Date: Thu, 5 Apr 2012 17:52:08 -0700
Subject: Use rsyslog to trigger log rotation

The previous implementation of log rotation used an hourly cron job to
check log file size and possibly perform a rotation. If the logging
rate is high, this interval may allow for root file system space
exhustion.

Utilizing rsyslog's outchannel mechanism enables log rotation to be
initiated as soon as the log file becomes larger than its configured
size.

Fixes Bug 7807.
---
 templates/system/syslog/node.def | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'templates/system/syslog/node.def')

diff --git a/templates/system/syslog/node.def b/templates/system/syslog/node.def
index 81fb3f6c..ebe02232 100644
--- a/templates/system/syslog/node.def
+++ b/templates/system/syslog/node.def
@@ -1,5 +1,5 @@
 priority: 400
 help: System logging daemon
 end: if /opt/vyatta/sbin/vyatta_update_syslog.pl; then
-          sudo /usr/sbin/invoke-rc.d rsyslog restart
+          sudo /usr/sbin/invoke-rc.d rsyslog reload || sudo /usr/sbin/invoke-rc.d rsyslog restart
      fi
-- 
cgit v1.2.3

