1
0
Fork 0
mirror of synced 2024-10-22 11:48:57 -04:00

fix(suse): skip service

SUSE based distributions do not use Cron, but instead a systemd
timer for running logrotate on a schedule.
As this timer is enabled through a systemd preset, skip the state
completely.

Signed-off-by: Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
This commit is contained in:
Georg Pfuetzenreuter 2024-08-22 13:10:23 +02:00
parent 1848fd6e0d
commit 26f74e58ac
No known key found for this signature in database
GPG key ID: 1ED2F138E7E6FF57
3 changed files with 7 additions and 0 deletions

View file

@ -14,6 +14,7 @@ RedHat:
default_config: default_config:
dateext: true dateext: true
Suse: Suse:
service: null
login_records_jobs: false login_records_jobs: false
default_config: default_config:
dateext: true dateext: true

View file

@ -3,6 +3,8 @@
{% from "logrotate/map.jinja" import logrotate with context %} {% from "logrotate/map.jinja" import logrotate with context %}
{%- if logrotate.service is not none %}
include: include:
- logrotate.config - logrotate.config
- logrotate.install - logrotate.install
@ -15,3 +17,5 @@ logrotate:
- pkg: logrotate-pkg - pkg: logrotate-pkg
- file: logrotate-config - file: logrotate-config
- file: logrotate-directory - file: logrotate-directory
{%- endif %}

View file

@ -49,6 +49,8 @@ control 'logrotate.service.running' do
'cronie' 'cronie'
when 'redhat', 'fedora' when 'redhat', 'fedora'
'crond' 'crond'
when 'suse'
'logrotate.timer'
else else
'cron' 'cron'
end end