1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-19 06:38:17 +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:
DL6ER 2017-09-07 19:42:00 +02:00
parent 2624e56de5
commit 4a90dac68e
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

View File

@ -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
}