[systemd-devel] propagate reload from other events

Andrei Borzenkov arvidjaar at gmail.com
Sat Oct 10 23:16:29 PDT 2015


11.10.2015 07:14, Johannes Ernst пишет:
> I understand that if foo.service specifies:
>
> PropagatesReloadTo=bar.service
>
> and I execute “systemctl reload foo”, this will trigger a reload of bar as well. Typically I might do that if I have changed some config file, and I want the daemon(s) to pick it up.
>
> Is there a similar mechanism that triggers a reload in bar when foo stops, or when foo starts, or events like that?
>
> I found a thread from 3 years ago on an OnStop= rule, but I don’t think that made it into the mainline? [1]
>
> My use case is that if I switch from foo.service to foo2.service (both require bar, and are mutually exclusive to each other), I’d like bar to reload.
>
>

Usually if service A requires service B, service B need not be aware 
about service A starting or stopping. In your case it actually sounds 
like "bar requires either foo or foo2", otherwise why bar would need 
restart?

> [1] http://lists.freedesktop.org/archives/systemd-devel/2012-November/007304.html
>
> Thanks for the help, as always,
>
>
>
> Johannes.
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>



More information about the systemd-devel mailing list