Skip to content

Instantly share code, notes, and snippets.

@ryanemmm
Last active December 28, 2015 19:29
Show Gist options
  • Save ryanemmm/7551006 to your computer and use it in GitHub Desktop.
Save ryanemmm/7551006 to your computer and use it in GitHub Desktop.
turns wifi off, then on.
#AppleScript
#- bounce wifi: turn it off, then turn it on
#- open AppleScript Editor, paste lines 4,5,6, save as application
#- ** oh be sure to set the network_device -- en0 in my case to the correct interface
set network_device to "en0"
do shell script "networksetup -setairportpower " & network_device & " off"
do shell script "networksetup -setairportpower " & network_device & " on"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment