You are not logged in.
Hi,
I have a portable music streamer (RPi Zero) that I want to to log onto the local LAN by wifi if the network is present, but start an AP with hostapd/dnsmasq if I'm away from the LAN. A script is run at the end of the boot sequence which looks to see if a network connection has been made, and if not then start hostapd etc. Now, the script is run before the network is properly up and I use the inelegant 'sleep 10' to let things get done before checking the connection. This works but it feels very crude. I have tried using "After=network-online.target" in the systemd service file calling the script but this doesn't appear to work.
Any more elegant ways of dealing with this? All ideas greatfully received,
Ian Sutherland
For completeness, systemd-networkd and wpa_supplicant@wlan0 bring up the connection to the LAN, and then the systemd service file is run.
Offline