mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Merge pull request #1682 from pi-hole/tweak/VPN_hostnames
Add VPN host names to local.list
This commit is contained in:
commit
17be6b860e
@ -53,6 +53,7 @@ piholeDir=/etc/${basename}
|
||||
adList=${piholeDir}/gravity.list
|
||||
blackList=${piholeDir}/black.list
|
||||
localList=${piholeDir}/local.list
|
||||
VPNList=/etc/openvpn/ipp.txt
|
||||
justDomainsExtension=domains
|
||||
matterAndLight=${basename}.0.matterandlight.txt
|
||||
supernova=${basename}.1.supernova.txt
|
||||
@ -337,6 +338,11 @@ gravity_hostFormatLocal() {
|
||||
rm "${localList}"
|
||||
gravity_doHostFormat "${localList}.tmp" "${localList}"
|
||||
rm "${localList}.tmp"
|
||||
|
||||
# Generate local HOSTS list with information obtained from OpenVPN (if available)
|
||||
if [[ -f ${VPNList} ]]; then
|
||||
awk -F, '{printf $2"\t"$1"\n"}' "${VPNList}" >> "${localList}"
|
||||
fi
|
||||
}
|
||||
|
||||
gravity_hostFormatGravity() {
|
||||
|
Loading…
Reference in New Issue
Block a user