[systemd-devel] Launching a unit in response to a D-Bus signal

Lennart Poettering lennart at poettering.net
Tue Oct 2 07:42:19 PDT 2012


On Mon, 01.10.12 12:58, Matthew Booth (mbooth at redhat.com) wrote:

> I have a requirement to restart squid whenever the VPN goes up or
> down[1]. Reading around, it seems that the way to do this would be
> in response to the relevant D-Bus signal, which seems to be this
> one:

We can't do this now. And I am not sure we should be able to.

> signal sender=:1.6 -> dest=(null destination) serial=269
> path=/org/freedesktop/NetworkManager/ActiveConnection/2;
> interface=org.freedesktop.NetworkManager.VPN.Connection;
> member=VpnStateChanged
> 
> I expected that systemd would allow me to do this, but as far as I
> can tell it doesn't (I'm using F17). I can obviously write my own
> daemon to do this, but it seems to me that a daemon just for this
> would be a waste. I think this sounds like a good fit for systemd.
> Is it anything anybody's looked at?
> 
> Thanks,
> 
> Matt
> 
> [1] It's not directly relevant to this post, but the reason is that
> squid doesn't pick up the new nameservers until it's restarted.
> 
> P.S. I'm not subscribed.

To me this really appears as if squid should be fixed to recheck
/etc/resolv.conf and reread the namesrevers in such a case. THis is what
firefox and friends do.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list