diff --git a/usr/bin/wifi-setup b/usr/bin/wifi-setup index 2099de0..c6494f2 100755 --- a/usr/bin/wifi-setup +++ b/usr/bin/wifi-setup @@ -1,20 +1,20 @@ #!/bin/sh 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" > /etc/resolv.conf +echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf nmcli c up $SSID