dot_testing/scripts/connect

25 lines
411 B
Plaintext
Raw Normal View History

2021-05-11 10:37:58 -05:00
#!/bin/sh
case $1 in
"c"*)
wpa_supplicant -iwlp3s0 -c/etc/wpa_supplicant/wpa_supplicant.conf -B
dhcpcd wlp3s0
tor & disown
2021-05-11 11:06:16 -05:00
;;
2021-05-11 10:37:58 -05:00
"d"*)
killall -15 wpa_supplicant dhcpcd tor
2021-05-11 11:06:16 -05:00
;;
2021-05-11 10:37:58 -05:00
"r"*)
sh $0 d
sh $0 c
2021-05-11 11:06:16 -05:00
;;
2021-05-11 10:37:58 -05:00
*)
printf "\
simple wrapper for connecting to a network
${0} restart to restart wifi
${0} disconnect to disconnect
${0} connect to connect to network
"
easc
exit 0