Commit b7c1627e authored by Romain Courteaud's avatar Romain Courteaud 🐸

Put all configurations in logrotate included file.

"It seems" that logrotate does not allow to put those parameters in
logrotate.conf
parent f68c12d0
......@@ -36,18 +36,10 @@ class Recipe(GenericBaseRecipe):
logrotate_conf_file = self.options['conf']
logrotate_conf = [
'daily',
'dateext',
'rotate 3650',
'compress',
'compresscmd %s' % self.options['gzip-binary'],
'compressoptions -9',
'uncompresscmd %s' % self.options['gunzip-binary'],
'notifempty',
'sharedscripts',
'create',
'include %s' % logrotate_d,
'olddir %s' % logrotate_backup,
]
logrotate_conf_file = self.createFile(logrotate_conf_file,
......@@ -69,7 +61,16 @@ class Part(GenericBaseRecipe):
logrotate_d = self.options['logrotate-entries']
conf = []
conf = [
'daily',
'dateext',
'rotate 3650',
'compress',
'notifempty',
'sharedscripts',
'create',
'olddir %s' % logrotate_backup,
]
if 'post' in self.options:
conf.append("postrotate\n%s\nendscript" % self.options['post'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment