mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +00:00
Remove the empty templates gravity.list, white.list, black.list. The old source files whitelist.txt, blacklist.txt, and regex.list still exist and need to be removed in a follow-up commit
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
ee20164207
commit
e57d0fb93c
1 changed files with 4 additions and 19 deletions
23
gravity.sh
23
gravity.sh
|
@ -32,10 +32,7 @@ whitelistFile="${piholeDir}/whitelist.txt"
|
||||||
blacklistFile="${piholeDir}/blacklist.txt"
|
blacklistFile="${piholeDir}/blacklist.txt"
|
||||||
regexFile="${piholeDir}/regex.list"
|
regexFile="${piholeDir}/regex.list"
|
||||||
|
|
||||||
adList="${piholeDir}/gravity.list"
|
|
||||||
blackList="${piholeDir}/black.list"
|
|
||||||
localList="${piholeDir}/local.list"
|
localList="${piholeDir}/local.list"
|
||||||
whiteList="${piholeDir}/white.list"
|
|
||||||
VPNList="/etc/openvpn/ipp.txt"
|
VPNList="/etc/openvpn/ipp.txt"
|
||||||
|
|
||||||
piholeGitDir="/etc/.pihole"
|
piholeGitDir="/etc/.pihole"
|
||||||
|
@ -146,18 +143,6 @@ gravity_store_in_database() {
|
||||||
|
|
||||||
# Delete tmpfile
|
# Delete tmpfile
|
||||||
rm "$tmpFile" > /dev/null 2>&1 || true
|
rm "$tmpFile" > /dev/null 2>&1 || true
|
||||||
|
|
||||||
# Only create template file if asked to
|
|
||||||
if [ "${template}" != "-" ]; then
|
|
||||||
# Empty $template if it already exists, otherwise, create it
|
|
||||||
output=$( { : > "${template}"; } 2>&1 )
|
|
||||||
status="$?"
|
|
||||||
|
|
||||||
if [[ "${status}" -ne 0 ]]; then
|
|
||||||
echo -e "\\n ${CROSS} Unable to create empty ${template}\\n ${output}"
|
|
||||||
gravity_Cleanup "error"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Determine if DNS resolution is available before proceeding
|
# Determine if DNS resolution is available before proceeding
|
||||||
|
@ -569,7 +554,7 @@ gravity_Whitelist() {
|
||||||
echo -ne " ${INFO} ${str}..."
|
echo -ne " ${INFO} ${str}..."
|
||||||
|
|
||||||
# Store whitelisted files in gravity database
|
# Store whitelisted files in gravity database
|
||||||
gravity_store_in_database "whitelist" "${whitelistFile}" "${whiteList}"
|
gravity_store_in_database "whitelist" "${whitelistFile}"
|
||||||
|
|
||||||
echo -e "${OVER} ${INFO} ${str}"
|
echo -e "${OVER} ${INFO} ${str}"
|
||||||
}
|
}
|
||||||
|
@ -589,7 +574,7 @@ gravity_ShowBlockCount() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Store regex files in gravity database
|
# Store regex files in gravity database
|
||||||
gravity_store_in_database "regex" "${regexFile}" "-"
|
gravity_store_in_database "regex" "${regexFile}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Parse list of domains into hosts format
|
# Parse list of domains into hosts format
|
||||||
|
@ -639,7 +624,7 @@ gravity_ParseBlacklistDomains() {
|
||||||
local output status
|
local output status
|
||||||
|
|
||||||
# Store gravity domains in gravity database
|
# Store gravity domains in gravity database
|
||||||
gravity_store_in_database "gravity" "${piholeDir}/${preEventHorizon}" "${adList}"
|
gravity_store_in_database "gravity" "${piholeDir}/${preEventHorizon}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create user-added blacklist entries
|
# Create user-added blacklist entries
|
||||||
|
@ -649,7 +634,7 @@ gravity_ParseUserDomains() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fill database table
|
# Fill database table
|
||||||
gravity_store_in_database "blacklist" "${blacklistFile}" "${blackList}"
|
gravity_store_in_database "blacklist" "${blacklistFile}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Trap Ctrl-C
|
# Trap Ctrl-C
|
||||||
|
|
Loading…
Reference in a new issue