diff --git a/usr/bin/wifi-setup b/usr/bin/wifi-setup index bf22b13..a2dac78 100755 --- a/usr/bin/wifi-setup +++ b/usr/bin/wifi-setup @@ -1,22 +1,21 @@ #!/bin/sh set -ex SSID=$1 PSWD=$2 if [ -z "$SSID" ]; then echo "Please pass the SSID as the first argument" exit 1 fi if [ -z "$PSWD" ]; then echo "Please pass the password as the second argument" exit 1 fi nmcli c add con-name $SSID ifname wlan0 type wifi ssid $SSID nmcli c modify $SSID wifi-sec.key-mgmt wpa-psk nmcli c modify $SSID wifi-sec.psk $PSWD -echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf nmcli c up $SSID