[systemd-devel] Can I use an EnvironmentFile to configure a Timer?
Lennart Poettering
mzxreary at 0pointer.de
Thu Aug 22 09:26:24 UTC 2024
On Mo, 05.08.24 08:08, Windl, Ulrich (u.windl at ukr.de) wrote:
> Hi!
>
> I have a service and timer template where the service instances are configured via an environment file like etc/.../%i.conf.
> The timer template will use the @%i.service unit, but currently has a fixed "OnCalendar=daily" currently.
> As the instances might want to run with a different frequency, one could "edit" the time files.
> However I had the idea to read the timer interval from an environment variable like "OnCalendat=${interval}".
> However, AFAIK, environment variables are supported in service units only, right?
We only do env var expansion in ExecStart= and related line
types. Nothing else. (And I think it actually was a mistake there too.)
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list