Adding wifi scripts; general cleanup

This commit is contained in:
DarkFeather
2017-10-25 23:50:52 -05:00
parent e4afa2e8e5
commit ce9d50ab0c
7 changed files with 58 additions and 14 deletions

13
Admin/wifiboot Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
MAC="34:f6:4b:36:12:8f"
interface=`ip link list | grep -B 1 "$MAC" | head -n 1 | cut -f 2 -d ':' | cut -f 2 -d ' '`
ip link set "$interface" up
for i in `iwlist "$interface" scanning | grep ESSID | cut -f 2 -d \" | tr '[:upper:]' '[:lower:]'`; do
if [ -f /etc/wpa_supplicant/"$i".conf ]; then
/root/bin/wifi "$i" "$interface"
if [ $? -eq 0 ]; then
exit 0;
fi
fi
done