dotfiles-old/.local/scripts/add-wifi.sh

16 lines
253 B
Bash
Raw Normal View History

2022-03-10 03:42:22 +00:00
#!/bin/sh
if [ "$#" = "2" ]; then
SSID="$1"
PASSWORD="$2"
sudo sh -c "wpa_passphrase $SSID $PASSWORD >> /etc/wpa_supplicant/wpa_supplicant.conf"
sudo sv restart dhcpcd
else
echo "$1 = wifi network name (SSID)"
echo "$2 = wifi password"
fi