Commit 2308c6f6 authored by Łukasz Nowak's avatar Łukasz Nowak

- allow to register rotations


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45634 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e184fcd3
...@@ -103,6 +103,14 @@ class Recipe(BaseSlapRecipe): ...@@ -103,6 +103,14 @@ class Recipe(BaseSlapRecipe):
self.path_list.extend([logrotate_d, logrotate_conf, logrotate_cron]) self.path_list.extend([logrotate_d, logrotate_conf, logrotate_cron])
return logrotate_d return logrotate_d
def registerLogRotation(self, name, log_file_list, postrotate_script):
"""Register new log rotation requirement"""
open(os.path.join(self.logrotate_d, name), 'w').write(
self.substituteTemplate(self.getTemplateFilename(
'logrotate_entry.in'),
dict(file_list=['"'+q+'"' for q in log_file_list],
postrotate=postrotate_script)))
def linkBinary(self): def linkBinary(self):
"""Links binaries to instance's bin directory for easier exposal""" """Links binaries to instance's bin directory for easier exposal"""
for linkline in self.options.get('link_binary_list', '').splitlines(): for linkline in self.options.get('link_binary_list', '').splitlines():
......
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