Jaime Soriano
Jaime Soriano

Reputation: 7359

Propagate systemd reloads with sd_notify()

I'm implementing a daemon that supports sd_notify(), this daemon generates configuration files for other daemons.

I'd like to make use of systemd dependency management to propagate reloads to other daemons, so if my daemon generates new configuration, dependant daemons reload. For that I was trying to use RELOADING=1 systemd notification and PropagatesReloadTo=/ReloadPropagatedFrom= properties to notify dependant services, but it seems that this property only propagates reloads originated by systemctl reload and not the ones notified with sd_notify().

Is there any way of using sd_notify() or something similar to notify dependant services that they should reload?

Upvotes: 1

Views: 611

Answers (1)

Jaime Soriano
Jaime Soriano

Reputation: 7359

It was indeed not working because it was not supported, but after the merge of #6550, using sd_notify() from a service to notify RELOADING=1 notifies also units in the list of PropagatesReloadTo=/ReloadPropagatedFrom=.

Upvotes: 1

Related Questions