mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-28 00:53:19 +00:00
Use pre-defined variables for desired interface
This commit is contained in:
parent
f9717bcff6
commit
e7926148ed
1 changed files with 4 additions and 3 deletions
|
@ -89,9 +89,10 @@ chooseInterfaceCmd=(whiptail --separate-output --radiolist "Choose An Interface"
|
||||||
chooseInterfaceOptions=$("${chooseInterfaceCmd[@]}" "${interfacesArray[@]}" 2>&1 >/dev/tty)
|
chooseInterfaceOptions=$("${chooseInterfaceCmd[@]}" "${interfacesArray[@]}" 2>&1 >/dev/tty)
|
||||||
for desiredInterface in $chooseInterfaceOptions
|
for desiredInterface in $chooseInterfaceOptions
|
||||||
do
|
do
|
||||||
piholeInterface=$desiredInterface
|
IPv4dev=$desiredInterface
|
||||||
echo "Using interface: $piholeInterface"
|
IPv4addr=$(ip -o -f inet addr show dev $IPv4dev | awk '{print $4}' | awk 'END {print}')
|
||||||
echo ${piholeInterface} > /tmp/piholeINT
|
echo "Using interface: $IPv4dev"
|
||||||
|
echo ${IPv4dev} > /tmp/piholeINT
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue