I have 2 NICs, one external (wlan2) and one internal (wlan1). I've put together a script that when run manually will disable wlan1 if wlan2 is present (wlan1 sucks and has a hard time staying connected to most routers). I want this script to run automatically every time the computer boots AND every time it resumes from sleep. Can someone point me to what mechanism in Linux I can use for this? The sleep part is especially important, as at work I frequently sleep/resume my laptop and then run the script manually.