[systemd] network dependent starting of services

Hello,normally it is possible to change to order/dependencies of services as described here.Furthermore one can automatically connect with either Ethernet (net-auto-wired.service) or Wlan (net-auto-wireless.service) at boot.

Currently I enabled hostapd.service. However, I only want to start it, if I am connected with ethernet and not wlan.If I am connected with wlan, i don't want to start hostapd.And I want to automatically connect to ethernet, if it is available. Otherwise to a known wlan hotspot.

Re: [systemd] network dependent starting of services

The lines under [UNIT] here have been altered, been watching it in journalctl -b , it's doing exactly what I want it to and no one here seems to have anything negative to say about it, figure out where the services files are by doing systemctl status <service>. Just make use of WANTS/AFTER as you need them. You probably need something like "AFTER=netcfg@eth0.service" in the unit of service you want to wait for eth0 to be up, whatever its profile name is.