Created
August 14, 2013 04:23
-
-
Save kt3k/6227992 to your computer and use it in GitHub Desktop.
AppleScript to turn on and off the EasyTether extension.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set state to do shell script "kextstat | grep EasyTether | cat" | |
if state is "" then | |
display dialog "turning on EasyTether" | |
do shell script "kextload /System/Library/Extensions/EasyTetherUSBEthernet.kext/" with administrator privileges | |
else | |
display dialog "turning off EasyTether" | |
do shell script "kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext/" with administrator privileges | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Open AppleScript Editor, copy and paste the above, save it as an application (not a script file) and the saved application works as an EasyTether on/off button.