Re: Antw: [EXT] Re: User/Group overrides in a templated service triggered via timer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mo, 07.09.20 10:00, Ulrich Windl (Ulrich.Windl@xxxxxxxxxxxxxxxxxxxx) wrote:

> > "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...

Not sure I can parse this. Both timers and services are units in
systemd. You can enable timer units, and you can enable service units,
it all depends on what you put in their [Install] section. Sometimes
it makes sense to add an [Install] section to one, sometimes to the
other, sometimes to both, dependning on what the triggers should be
that you want to use. Pretty often it might make sense to include just
an Also=foobar.timer in the [Install] section of foobar.service, which
then means that if the service is enabled, foobar.timer is enabled
implicitly.

it really boils down to what you put in [Install]. And key really is
that timers are just *one* way to trigger a service, and the same
service might be triggered via a multitude of different triggers and
not just one.

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux