On Sun, Jun 25, 2023 at 05:51:46PM +0200, André Rodier wrote: > I have a simple script, to save / and store dynamic nftables sets. > > I would like to create a systemd service, that starts -after- nftables is > started, and stops -before- nftables is > stopped.
I think most of the time, this is not done as a systemd service at all. It's usually invoked from the "up" hook when your network interface is brought up, assuming you use /etc/network/interfaces. If you use NetworkManager, then I don't know. Check interfaces(5) and look for "up", "post-up" and "pre-down".