systemd timing
Xen
list at xenhideout.nl
Sat Jul 15 11:31:51 UTC 2017
Karl Auer schreef op 15-07-2017 13:04:
> How can I make a systemd service run after all network interfaces are
> up?
>
> 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.
>
> 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.
You asked before, but personally I would just create a new service to
rerun this service.
If you want something else, it would have to be a timer, I guess, but...
I do not know.
Experiment :p. A one-shot service that stays, or a one-shot service that
exists? In any case many times you need to restart it since the service
will still be considered "started" I think.
So the first question is: does it have RemainAfterExit?
I really don't know how it all works, although I have experimented with
it enough.
I think I would just pull in a service using a network target. The
service runs "systemctl restart systemd.sysctl".
I mean, you can't do much with systemd's system.
You could use network.target or network-online.target. It was for the
ipv6 right.
Looking for a clean solution in a dirty system is not very useful ;-).
Regards.
More information about the ubuntu-users
mailing list