[systemd-devel] Overriding OnCalendar

Andrei Borzenkov arvidjaar at gmail.com
Fri Mar 29 18:59:41 UTC 2019


29.03.2019 21:35, Kenneth Porter пишет:
> I'm using the certbot package from EPEL to renew my letsencrypt
> certificates. I want to change the default renewal interval from daily
> to weekly. I created
> /etc/systemd/system/certbot-renew.timer.d/weekly.conf with the following
> content:
> 
> [Timer]
> # default is daily but that generates too many log files and we can
> # renew within a month of the cert's expiration, so weekly checks are
> # adequate.
> OnCalendar=weekly
> 
> Looking at the output of "journalctl -u certbot-renew.service" I still
> see the service running daily. What am I doing wrong?
> 


There can be multiple OnCalendar directives, so you simply told it to
fire weekly in addition to daily.

You need to reset previous OnCalendar list using empty value.

OnCalendar=
OnCalendar=weekly

> Here's /usr/lib/systemd/system/certbot-renew.timer:
> 
> [Unit]
> Description=This is the timer to set the schedule for automated renewals
> 
> [Timer]
> OnCalendar=daily
> RandomizedDelaySec=6hours
> Persistent=true
> 
> [Install]
> WantedBy=timers.target
> 
> 
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel



More information about the systemd-devel mailing list