Rotate conntrackd's log files

We should rotate conntrackd's log files to avoid FS filled up.

Change-Id: I6d9e40a372b49f2f014fb63440aed0028b4df494
This commit is contained in:
Jianghua Wang 2016-12-12 14:22:35 +08:00
parent 0542a6a533
commit 95a67bb757
2 changed files with 11 additions and 0 deletions

View File

@ -381,6 +381,10 @@ def enable_conntrack_service(himn, username):
CONNTRACK_CONF_SAMPLE,
'/etc/conntrackd/conntrackd.conf')
# Rotate log file for conntrack
utils.scp(himn, username,
'/etc/logrotate.d', 'etc/logrotate.d/conntrackd')
# Restart conntrackd service
utils.ssh(himn, username, 'service', 'conntrackd', 'restart')

View File

@ -0,0 +1,7 @@
/var/log/conntrackd*.log {
daily
maxsize 50M
rotate 7
copytruncate
missingok
}