systemd timing

Tom H tomh0665 at gmail.com
Sun Jul 16 18:38:46 UTC 2017


On Sat, Jul 15, 2017 at 7:04 AM, Karl Auer <kauer at biplane.com.au> wrote:


> How can I make a systemd service run after all network interfaces are
> up?

Before=network-online.target
Wants=network-online.target


> systemd-sysctl is a one-shot service that runs very early in the
> startup sequence; I need it to run again. Ideally every time a network
> interface comes up, but a workable solution would be after the network
> is up the first time.

Which network setup are you using? ifupdown? NM? systemd-networkd?


> Note that I need it to run *again* - i.e., as well as the first time.
>
> I suppose I could set up a new service to do this, but it would be
> cleaner if there were a way to tell the existing service to run again.

It'd be better to set up a new service because sysctl might need to
run "at the right time" for other values.




More information about the ubuntu-users mailing list