17 lines
293 B
Bash
Executable File
17 lines
293 B
Bash
Executable File
#!/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 $?
|