mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Fixed missing condition in if statement when deciding whether to listen on tun0/wg0
This commit is contained in:
parent
660d83468c
commit
edbd23a2a1
1 changed files with 10 additions and 4 deletions
|
@ -1445,10 +1445,16 @@ askClientDNS(){
|
|||
# Then create an empty hosts file or clear if it exists.
|
||||
$SUDO bash -c "> /etc/pivpn/hosts.$VPN"
|
||||
|
||||
# If the listening behavior is "Listen only on interface whatever", tell dnsmasq
|
||||
# to listen on the VPN interface as well. Other listening behaviors are permissive
|
||||
# enough.
|
||||
if [ "$(source "$piholeSetupVars" && echo "${DNSMASQ_LISTENING}")" = "single" ]; then
|
||||
# If the listening behavior is "Listen only on interface whatever", which is the
|
||||
# default, tell dnsmasq to listen on the VPN interface as well. Other listening
|
||||
# behaviors are permissive enough.
|
||||
|
||||
# Source in a subshell to prevent overwriting script's variables
|
||||
DNSMASQ_LISTENING="$(source "$piholeSetupVars" && echo "${DNSMASQ_LISTENING}")"
|
||||
|
||||
# $DNSMASQ_LISTENING is not set if you never edit/save settings in the DNS page,
|
||||
# so if the variable is empty, we still add the 'interface=' directive.
|
||||
if [ -z "${DNSMASQ_LISTENING}" ] || [ "${DNSMASQ_LISTENING}" = "single" ]; then
|
||||
echo "interface=$pivpnDEV" | $SUDO tee -a "$dnsmasqConfig" > /dev/null
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue