mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +00:00
only parse files required by Pi-hole
This commit is contained in:
parent
b4f1fe08f0
commit
e10182c839
1 changed files with 10 additions and 3 deletions
|
@ -854,10 +854,17 @@ list_files_in_dir() {
|
|||
# If it's a directoy, do nothing
|
||||
:
|
||||
else
|
||||
# Othwerise, display the filename
|
||||
log_write "\n${COL_LIGHT_GREEN}$(ls -ld ${dir_to_parse}/${each_file})${COL_NC}"
|
||||
# Then, parse the file's content into an array so each line can be analyzed if need be
|
||||
for i in "${!REQUIRED_FILES[@]}"; do
|
||||
if [[ "${dir_to_parse}/${each_file}" == ${REQUIRED_FILES[$i]} ]]; then
|
||||
# display the filename
|
||||
log_write "\n${COL_LIGHT_GREEN}$(ls -ld ${dir_to_parse}/${each_file})${COL_NC}"
|
||||
# and parse the file into an array in case we ever need to analyze it line-by-line
|
||||
make_array_from_file "${dir_to_parse}/${each_file}"
|
||||
else
|
||||
:
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue