11 lines
199 B
Bash
Executable file
11 lines
199 B
Bash
Executable file
#!/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
|
|
|