[systemd-devel] Antw: [EXT] Re: User/Group overrides in a templated service triggered via timer
Ulrich Windl
Ulrich.Windl at rz.uni-regensburg.de
Mon Sep 7 08:00:17 UTC 2020
>>> Lennart Poettering <lennart at poettering.net> schrieb am 04.09.2020 um 18:36
in
Nachricht <20200904163639.GU267847 at gardel-login>:
> On Mo, 31.08.20 16:50, Konstantin Ryabitsev (konstantin at linuxfoundation.org)
> wrote:
>
>> On Mon, Aug 31, 2020 at 04:49:32PM ‑0400, Kevin P. Fleming wrote:
>> > Yes, to get the instance‑named symlink created.
>
> This is not necessary.
>
> Unit instances can be activated on‑the‑fly without further prepartion
> or regsitration of the instance string or so. it's sufficient if the
> template unit exists.
>
>> Wouldn't that execute the service on boot, or does that not apply to
>> oneshot items?
>
> "Enabling" doesn't necessarily mean "start this at boot". Instead it
> just means "start this at the hookpoints that are declared in the
> unit's [Install] section". Typically this lists a hook point activated
> that is run at boot, for example timers.target is the generic
> hookpoint for timer units to be activated at boot, and
> multi‑user.target is the generic hookpoint for regular system services
> (see systemd.special(5) for a list of other units that can be useful
> hookpoints, if you are curious). However [Install] can list anything
> it wants to, including for example "start me whenever apache starts"
> or "start me whenever a bluetooth controller shows up".
>
> Anyway, long story short: you typically do not enable services that
> are only supposed to activated by timer units, enabling those timers
> should entirely suffice, and the timers will start the services when
> the time comes.
Interesting: I had expected that units using a timer would not be run when
"disabled", meaning "timer" is just a trigger, but of no unit cares...
>
> Lennart
>
> ‑‑
> Lennart Poettering, Berlin
> _______________________________________________
> 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