Workaround to not parse entire file
This commit is contained in:
parent
ae7628e60f
commit
e8c57ba19e
6
mon
6
mon
@ -85,10 +85,12 @@ ip link set "$iface" up
|
|||||||
# For monitoring only used for using the same channel as the ap
|
# For monitoring only used for using the same channel as the ap
|
||||||
if [[ -f "hostapd-wpe.conf" ]]; then
|
if [[ -f "hostapd-wpe.conf" ]]; then
|
||||||
echo "[+] Found hostapd-wpe.conf in the current directory. Using it."
|
echo "[+] Found hostapd-wpe.conf in the current directory. Using it."
|
||||||
source hostapd-wpe.conf
|
# Import channel variable only
|
||||||
|
source <(grep -E '^[[:space:]]*channel[[:space:]]*=' hostapd-wpe.conf
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "[!] hostapd-wpe.conf not found in the current directory. Using the default: /etc/hostapd-wpe/hostapd-wpe.conf"
|
echo "[!] hostapd-wpe.conf not found in the current directory. Using the default: /etc/hostapd-wpe/hostapd-wpe.conf"
|
||||||
source /etc/hostapd-wpe/hostapd-wpe.conf
|
source <(grep -E '^[[:space:]]*channel[[:space:]]*=' /etc/hostapd-wpe/hostapd-wpe.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start monitoring
|
# Start monitoring
|
||||||
|
Loading…
x
Reference in New Issue
Block a user