A. I'm pretty sure it needs to be en1 rather than en0, though it may depend on the Mac model. I.e. en1 is wifi on Macs with both ethernet and wifi. I don't know what a MacBook Air has for its wifi interface name, since it doesn't ship with ethernet by default.
B. If just the do shell script line is placed in an AppleScript application, then that app can be added to a user's Login Items, and will run at login. I mention this because it's easier to add things to run at login than it is to add things to run at shutdown or logout.