diff --git a/plugin_source/deployment_scripts/compute_post_deployment.py b/plugin_source/deployment_scripts/compute_post_deployment.py index 4ef6781..d05c553 100755 --- a/plugin_source/deployment_scripts/compute_post_deployment.py +++ b/plugin_source/deployment_scripts/compute_post_deployment.py @@ -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') diff --git a/plugin_source/deployment_scripts/etc/logrotate.d/conntrackd b/plugin_source/deployment_scripts/etc/logrotate.d/conntrackd new file mode 100644 index 0000000..52a0222 --- /dev/null +++ b/plugin_source/deployment_scripts/etc/logrotate.d/conntrackd @@ -0,0 +1,7 @@ +/var/log/conntrackd*.log { + daily + maxsize 50M + rotate 7 + copytruncate + missingok +}