2.5. Managing NetworkManager with systemd

Systemd is a system and service manager for Linux operating systems. For more information about systemd, see Managing services with systemd. You can manage services to run processes in a certain order. For this purpose, systemd has specific unit directives: Before and After.
This procedure describes how to stop NetworkManager.service before network gets disconnected.
In systemd, the following target units are important for the shutdown ordering of systemd.services when the network is disconnected.