ShadowArch/Admin/wifi

17 lines
293 B
Plaintext
Raw Normal View History

2017-10-25 23:50:52 -05:00
#!/bin/bash
if [ -z "$1" ]; then
echo Usage: $0 conf_name '[ interface ]'
exit 1;
else
conf="$1"
fi
if [ -z "$2" ]; then
interface="wlp4s0"
else
interface="$2"
fi
wpa_supplicant -i "$interface" -c /etc/wpa_supplicant/"${conf}".conf -B
sleep 3
dhcpcd "$interface"
exit $?