Report comment

Hi Guy, Good to see the script is being put to good use. Thanks for the reference in the script.

Not something I have needed to look at but my initial thoughts would be to create a new function that checks /sys/class/net/ for devices starting with e and capture the name. Then determine if you have a valid connection to a router, ip command or the options found in the /sys/class/net/folder. This returns true or false.

I would call the new function after the FindSSID call and capture the result in a variable.
Then in the main IF sequence add in a elseif that if eth0 (or similar device name) is true then print "Ethernet up"

The logic would then be that, wifi is activated if available ssid found, if no wifi found check LAN variable is True then do no more, if Lan variable is False continue to the hotspot creation.

If you don't have much luck let me know via email and I will look into it further.