mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Revert "Fix error: /opt/pihole/gravity.sh: 385: Warning: command substitution: ignored null byte in input"
This commit is contained in:
parent
061510098c
commit
d5547f5c7c
1 changed files with 2 additions and 1 deletions
|
@ -387,8 +387,9 @@ gravity_ConsolidateDownloadedBlocklists() {
|
||||||
if [[ -r "${i}" ]]; then
|
if [[ -r "${i}" ]]; then
|
||||||
# Remove windows CRs from file, convert list to lower case, and append into $matterAndLight
|
# Remove windows CRs from file, convert list to lower case, and append into $matterAndLight
|
||||||
tr -d '\r' < "${i}" | tr '[:upper:]' '[:lower:]' >> "${piholeDir}/${matterAndLight}"
|
tr -d '\r' < "${i}" | tr '[:upper:]' '[:lower:]' >> "${piholeDir}/${matterAndLight}"
|
||||||
|
|
||||||
# Ensure that the first line of a new list is on a new line
|
# Ensure that the first line of a new list is on a new line
|
||||||
IFS= read -r -d '' lastLine <"${piholeDir}/${matterAndLight}" || [[ $lastLine ]]
|
lastLine=$(tail -1 "${piholeDir}/${matterAndLight}")
|
||||||
if [[ "${#lastLine}" -gt 0 ]]; then
|
if [[ "${#lastLine}" -gt 0 ]]; then
|
||||||
echo "" >> "${piholeDir}/${matterAndLight}"
|
echo "" >> "${piholeDir}/${matterAndLight}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue