So we have a group of students that like to turn their wifi off to goof around on their school computers during class w/o the teacher being able to see what they are doing remotely. I'd like to make it so they cannot turn off their wifi. I have a current solution utilizing apple script and a plist that checks airportstatus every 10 seconds and if it finds that it is off it turns it back on... I'd like something a bit smarter than that and less demanding on the computer. I've seen something similar to what I want in the link below for turning WiFi off when ethernet is plugged in but so far I've not been able to hone it down to simply watch for a change in airport power then make the change.
http://www.georges.nu/blog/2011/06/...turn-off-airport-when-ethernet-is-plugged-in/
When I put everything together from the link above on my macbook pro if i turn off wifi it turns back on immediately which is what I want but not how it was designed to work and also it does not work at all on the student macbook airs due to the fact they have no ethernet so en0 is wifi... I did attempt to simply replace en1 with en0 where applicable but that got me nowhere.
Basically I want something that detects a change in en0 from on to off and when en0 is off run the command to turn it back on and that doesn't rely on an apple script running on interval like what I have now. Any ideas?
http://www.georges.nu/blog/2011/06/...turn-off-airport-when-ethernet-is-plugged-in/
When I put everything together from the link above on my macbook pro if i turn off wifi it turns back on immediately which is what I want but not how it was designed to work and also it does not work at all on the student macbook airs due to the fact they have no ethernet so en0 is wifi... I did attempt to simply replace en1 with en0 where applicable but that got me nowhere.
Basically I want something that detects a change in en0 from on to off and when en0 is off run the command to turn it back on and that doesn't rely on an apple script running on interval like what I have now. Any ideas?