mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-01-12 06:54:53 +00:00
Ignore comments in adlists.list section.
This commit is contained in:
parent
a9c3e2c7ba
commit
9a421d510a
1 changed files with 7 additions and 3 deletions
|
@ -81,7 +81,6 @@ function version_check {
|
||||||
|
|
||||||
echo "::: Writing PHP version to logfile."
|
echo "::: Writing PHP version to logfile."
|
||||||
php_ver="$(php -v |& head -n1)" && log_write "${php_ver}" || log_write "PHP not installed."
|
php_ver="$(php -v |& head -n1)" && log_write "${php_ver}" || log_write "PHP not installed."
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function distro_check {
|
function distro_check {
|
||||||
|
@ -407,7 +406,12 @@ echo "############ adlists.list #############" >> ${DEBUG_LOG}
|
||||||
echo "#######################################" >> ${DEBUG_LOG}
|
echo "#######################################" >> ${DEBUG_LOG}
|
||||||
if [ -e "$ADLISTSFILE" ]
|
if [ -e "$ADLISTSFILE" ]
|
||||||
then
|
then
|
||||||
cat "$ADLISTSFILE" >> ${DEBUG_LOG}
|
while read -r line; do
|
||||||
|
if [ ! -z "$line" ]; then
|
||||||
|
[[ "$line" =~ ^#.*$ ]] && continue
|
||||||
|
echo "$line" >> ${DEBUG_LOG}
|
||||||
|
fi
|
||||||
|
done < "$ADLISTSFILE"
|
||||||
echo >> ${DEBUG_LOG}
|
echo >> ${DEBUG_LOG}
|
||||||
else
|
else
|
||||||
echo "No adlists.list file found... using adlists.default!" >> ${DEBUG_LOG}
|
echo "No adlists.list file found... using adlists.default!" >> ${DEBUG_LOG}
|
||||||
|
|
Loading…
Reference in a new issue