mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-24 15:13:42 +00:00
Check if files are readible, not just present
This commit is contained in:
parent
1e7f843993
commit
a5f2305947
1 changed files with 2 additions and 2 deletions
|
@ -131,7 +131,7 @@ echo "** Aggregating list of domains..."
|
|||
find $origin/ -type f -name "*.$justDomainsExtension" -exec cat {} \; | tr -d '\r' > $origin/$matter
|
||||
|
||||
# Append blacklist entries if they exist
|
||||
if [[ -f $blacklist ]];then
|
||||
if [[ -r $blacklist ]];then
|
||||
numberOf=$(cat $blacklist | sed '/^\s*$/d' | wc -l)
|
||||
echo "** Blacklisting $numberOf domain(s)..."
|
||||
cat $blacklist >> $origin/$matter
|
||||
|
@ -159,7 +159,7 @@ function gravity_advanced()
|
|||
}
|
||||
|
||||
# Whitelist (if applicable) then remove duplicates and format for dnsmasq
|
||||
if [[ -f $whitelist ]];then
|
||||
if [[ -r $whitelist ]];then
|
||||
# Remove whitelist entries
|
||||
numberOf=$(cat $whitelist | sed '/^\s*$/d' | wc -l)
|
||||
plural=; [[ "$numberOf" != "1" ]] && plural=s
|
||||
|
|
Loading…
Reference in a new issue