Skip to content

Instantly share code, notes, and snippets.

@tysonclugg
Created July 23, 2015 06:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tysonclugg/0ddddc25f671487bbd51 to your computer and use it in GitHub Desktop.
Save tysonclugg/0ddddc25f671487bbd51 to your computer and use it in GitHub Desktop.
#!/bin/sh
WLID=$( rfkill list | grep --only -P '[[:digit:]](?=: asus-wlan:)' )
WLNET='Tyson Network'
rfkill list $WLID
set -x
#nmcli c down id 'Tyson Network'
rfkill block $WLID
rfkill unblock $WLID
[ "_$1" != "_down" ] && {
sleep 2
#nmcli c up id 'Tyson Network'
ping -ac1 8.8.8.8
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment