Sometimes Ubuntu loses its connection (for example the router goes down), and I want to make sure that it reconnects to the right network. I don't want to just check that there is an internet connection because the modem might be down. I would use this in a script called by cron
.
In pseudo code:
if not connected to "wifiname" then
connect to "wifiname".
It should be simple, but most solutions want to check if connected to the Internet, but not a certain network.