mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-25 07:33:43 +00:00
Remove local.list and openVPN traces (#5480)
This commit is contained in:
commit
aca7b31b83
2 changed files with 1 additions and 25 deletions
|
@ -74,7 +74,6 @@ PIHOLE_CRON_FILE="${CRON_D_DIRECTORY}/pihole"
|
|||
|
||||
PIHOLE_INSTALL_LOG_FILE="${PIHOLE_DIRECTORY}/install.log"
|
||||
PIHOLE_RAW_BLOCKLIST_FILES="${PIHOLE_DIRECTORY}/list.*"
|
||||
PIHOLE_LOCAL_HOSTS_FILE="${PIHOLE_DIRECTORY}/local.list"
|
||||
PIHOLE_LOGROTATE_FILE="${PIHOLE_DIRECTORY}/logrotate"
|
||||
PIHOLE_FTL_CONF_FILE="${PIHOLE_DIRECTORY}/pihole.toml"
|
||||
PIHOLE_VERSIONS_FILE="${PIHOLE_DIRECTORY}/versions"
|
||||
|
|
25
gravity.sh
25
gravity.sh
|
@ -36,9 +36,6 @@ blacklistFile="${piholeDir}/blacklist.txt"
|
|||
regexFile="${piholeDir}/regex.list"
|
||||
adListFile="${piholeDir}/adlists.list"
|
||||
|
||||
localList="${piholeDir}/local.list"
|
||||
VPNList="/etc/openvpn/ipp.txt"
|
||||
|
||||
piholeGitDir="/etc/.pihole"
|
||||
GRAVITYDB=$(getFTLConfigValue files.gravity)
|
||||
GRAVITY_TMPDIR=$(getFTLConfigValue files.gravity_tmp)
|
||||
|
@ -297,12 +294,7 @@ migrate_to_database() {
|
|||
|
||||
# Determine if DNS resolution is available before proceeding
|
||||
gravity_CheckDNSResolutionAvailable() {
|
||||
local lookupDomain="pi.hole"
|
||||
|
||||
# Determine if $localList does not exist, and ensure it is not empty
|
||||
if [[ ! -e "${localList}" ]] || [[ -s "${localList}" ]]; then
|
||||
lookupDomain="raw.githubusercontent.com"
|
||||
fi
|
||||
local lookupDomain="raw.githubusercontent.com"
|
||||
|
||||
# Determine if $lookupDomain is resolvable
|
||||
if timeout 4 getent hosts "${lookupDomain}" &> /dev/null; then
|
||||
|
@ -684,18 +676,6 @@ gravity_ShowCount() {
|
|||
gravity_Table_Count "vw_regex_whitelist" "regex allowed filters"
|
||||
}
|
||||
|
||||
# Create "localhost" entries into hosts format
|
||||
gravity_generateLocalList() {
|
||||
# Empty $localList if it already exists, otherwise, create it
|
||||
echo "### Do not modify this file, it will be overwritten by pihole -g" > "${localList}"
|
||||
chmod 644 "${localList}"
|
||||
|
||||
# Add additional LAN hosts provided by OpenVPN (if available)
|
||||
if [[ -f "${VPNList}" ]]; then
|
||||
awk -F, '{printf $2"\t"$1".vpn\n"}' "${VPNList}" >> "${localList}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Trap Ctrl-C
|
||||
gravity_Trap() {
|
||||
trap '{ echo -e "\\n\\n ${INFO} ${COL_LIGHT_RED}User-abort detected${COL_NC}"; gravity_Cleanup "error"; }' INT
|
||||
|
@ -883,9 +863,6 @@ if ! gravity_DownloadBlocklists; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Create local.list
|
||||
gravity_generateLocalList
|
||||
|
||||
# Update gravity timestamp
|
||||
update_gravity_timestamp
|
||||
|
||||
|
|
Loading…
Reference in a new issue