12 lines
199 B
Text
12 lines
199 B
Text
|
#!/usr/bin/bash
|
||
|
|
||
|
if [ "$#" -eq 2 ]; then
|
||
|
PSK="$2"
|
||
|
else
|
||
|
read -p 'password: ' PSK
|
||
|
fi
|
||
|
|
||
|
wpa_passphrase "$1" "$PSK" | sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf
|
||
|
sudo sv restart wpa_supplicant
|
||
|
|