diff options
author | Ache <ache@ache.one> | 2016-10-26 23:23:37 +0200 |
---|---|---|
committer | Ache <ache@ache.one> | 2016-10-26 23:23:37 +0200 |
commit | 1f83c379db8a7245f50b5e0703319674ed85f1d4 (patch) | |
tree | 16e55326acb7aefe350588d1222f63ff528ecc29 | |
parent | Init with more scripts (diff) |
Add coWifi
-rwxr-xr-x | coWifi | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -0,0 +1,24 @@ + + +echo "$@ $*" +if [ -z "$1" ] +then + interface=wlan +else + interface="$1" +fi + + +if [ -z "$2" ] +then + sudo wpa_supplicant -B "-i${interface}" -D wext -c/etc/wpa_supplicant/wpa_supplicant.conf +else + if [ -z "$3" ] + then + sudo iwconfig "${interface}" essid "$2" + else + sudo iwconfig "${interface}" ap "$3" + sudo iwconfig "${interface}" essid "$2" + fi +fi +sudo dhcpcd "${interface}" |