start service in multi-user.target but don't stop it on isolate

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

 



On Mo, 19.03.18 14:39, Alexander 'Leo' Bergolth (leo at strike.wu.ac.at) wrote:

> Hi!
> 
> I am using the software watchdog daemon together with a watchdog device in "nowayout" mode.
> Thus once started, the watchdog daemon should never be stopped or the box will be rebooted.
> 
> watchdog.service is WantedBy multi-user.target and when changing e.g. to rescue.target, it should stay active.
> 
> I tried to configure this using IgnoreOnIsolate=true but this doesn't show the desired effect.
> On "systemd isolate rescue.target", watchdog.service still gets stopped:
> -------------------- 8< --------------------
> Mar 19 13:44:02 strike watchdog[1291]: stopping daemon (5.13)
> Mar 19 13:44:02 strike systemd[1]: Stopping watchdog daemon...
> -------------------- 8< --------------------
> 
> What did I do wrong?

Your service will by default depend on basic.target, and hence if that
goes away (and it will on isolate) then your service will too. Use
DefaultDependencies=no in [Unit] to clarify that your service should
not have such a default dependency on basic.target.

Lennart

-- 
Lennart Poettering, Red Hat


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

  Powered by Linux