How to reconnect to a wireless connection [closed]

view story

http://serverfault.com – I'm trying to figure out the best way to have the wifi adapter reconnect to a wireless network after it's been disconnected. When the wifi connection is lost (due to the AP rebooting, or a weak signal, etc.), I have to manually reconnect the wifi connection (via ifdown, then ifup). If I'm really lazy, I just turn off the machine and turn it back on (there's no monitor or keyboard attached to it). I'm wondering if there's an automated way to do this, without having to log in everytime? e.g. is there some sort of daemon that actively checks for a wifi/lan/internet connection, then reconnects (HowTos)