diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/msec/plugins/log.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/msec/plugins/log.py b/src/msec/plugins/log.py index 8f11e72..2749263 100644 --- a/src/msec/plugins/log.py +++ b/src/msec/plugins/log.py @@ -42,13 +42,13 @@ class log: try: retention = int(arg) except: - self.log.error(_('Invalid maximum password history length: "%s"') % arg) + self.log.error(_('Invalid retention period: "%s"') % arg) return logrotate = self.configfiles.get_config_file(self.LOGROTATE) - val = logrotate.get_match(self.LOGROTATE_ROTATE) + val = logrotate.get_match(self.LOGROTATE_ROTATE, '@1') - if val != retention: + if val != arg: self.log.info(_("Setting log retention period to %d weeks") % retention) logrotate.replace_line_matching(self.LOGROTATE_ROTATE, ("rotate %d" % retention)) |