mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Simplify awk code as the format of ipp.txt is actually fixed (only one entry per line is allowed)
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
2624e56de5
commit
4a90dac68e
@ -341,7 +341,7 @@ gravity_hostFormatLocal() {
|
||||
|
||||
# Generate local HOSTS list with information obtained from OpenVPN (if available)
|
||||
if [[ -f ${VPNList} ]]; then
|
||||
awk -F, '{for (i=NF; i>=1; i-=2) printf $i"\t"$(i-1) "\n" }' "${VPNList}" >> "${localList}"
|
||||
awk -F, '{printf $2"\t"$1"\n"}' "${VPNList}" >> "${localList}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user