mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-26 06:40:17 +00:00
Remove local.list and openVPN traces
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
834e52f15d
commit
de6e61705e
2 changed files with 1 additions and 25 deletions
|
@ -75,7 +75,6 @@ PIHOLE_CRON_FILE="${CRON_D_DIRECTORY}/pihole"
|
||||||
|
|
||||||
PIHOLE_INSTALL_LOG_FILE="${PIHOLE_DIRECTORY}/install.log"
|
PIHOLE_INSTALL_LOG_FILE="${PIHOLE_DIRECTORY}/install.log"
|
||||||
PIHOLE_RAW_BLOCKLIST_FILES="${PIHOLE_DIRECTORY}/list.*"
|
PIHOLE_RAW_BLOCKLIST_FILES="${PIHOLE_DIRECTORY}/list.*"
|
||||||
PIHOLE_LOCAL_HOSTS_FILE="${PIHOLE_DIRECTORY}/local.list"
|
|
||||||
PIHOLE_LOGROTATE_FILE="${PIHOLE_DIRECTORY}/logrotate"
|
PIHOLE_LOGROTATE_FILE="${PIHOLE_DIRECTORY}/logrotate"
|
||||||
PIHOLE_FTL_CONF_FILE="${PIHOLE_DIRECTORY}/pihole.toml"
|
PIHOLE_FTL_CONF_FILE="${PIHOLE_DIRECTORY}/pihole.toml"
|
||||||
PIHOLE_CUSTOM_HOSTS_FILE="${PIHOLE_DIRECTORY}/custom.list"
|
PIHOLE_CUSTOM_HOSTS_FILE="${PIHOLE_DIRECTORY}/custom.list"
|
||||||
|
|
25
gravity.sh
25
gravity.sh
|
@ -36,9 +36,6 @@ blacklistFile="${piholeDir}/blacklist.txt"
|
||||||
regexFile="${piholeDir}/regex.list"
|
regexFile="${piholeDir}/regex.list"
|
||||||
adListFile="${piholeDir}/adlists.list"
|
adListFile="${piholeDir}/adlists.list"
|
||||||
|
|
||||||
localList="${piholeDir}/local.list"
|
|
||||||
VPNList="/etc/openvpn/ipp.txt"
|
|
||||||
|
|
||||||
piholeGitDir="/etc/.pihole"
|
piholeGitDir="/etc/.pihole"
|
||||||
GRAVITYDB=$(getFTLConfigValue files.gravity)
|
GRAVITYDB=$(getFTLConfigValue files.gravity)
|
||||||
gravityDBschema="${piholeGitDir}/advanced/Templates/gravity.db.sql"
|
gravityDBschema="${piholeGitDir}/advanced/Templates/gravity.db.sql"
|
||||||
|
@ -299,12 +296,7 @@ migrate_to_database() {
|
||||||
|
|
||||||
# Determine if DNS resolution is available before proceeding
|
# Determine if DNS resolution is available before proceeding
|
||||||
gravity_CheckDNSResolutionAvailable() {
|
gravity_CheckDNSResolutionAvailable() {
|
||||||
local lookupDomain="pi.hole"
|
local lookupDomain="raw.githubusercontent.com"
|
||||||
|
|
||||||
# Determine if $localList does not exist, and ensure it is not empty
|
|
||||||
if [[ ! -e "${localList}" ]] || [[ -s "${localList}" ]]; then
|
|
||||||
lookupDomain="raw.githubusercontent.com"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Determine if $lookupDomain is resolvable
|
# Determine if $lookupDomain is resolvable
|
||||||
if timeout 4 getent hosts "${lookupDomain}" &> /dev/null; then
|
if timeout 4 getent hosts "${lookupDomain}" &> /dev/null; then
|
||||||
|
@ -686,18 +678,6 @@ gravity_ShowCount() {
|
||||||
gravity_Table_Count "vw_regex_whitelist" "regex allowed filters"
|
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
|
# Trap Ctrl-C
|
||||||
gravity_Trap() {
|
gravity_Trap() {
|
||||||
trap '{ echo -e "\\n\\n ${INFO} ${COL_LIGHT_RED}User-abort detected${COL_NC}"; gravity_Cleanup "error"; }' INT
|
trap '{ echo -e "\\n\\n ${INFO} ${COL_LIGHT_RED}User-abort detected${COL_NC}"; gravity_Cleanup "error"; }' INT
|
||||||
|
@ -884,9 +864,6 @@ if ! gravity_DownloadBlocklists; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create local.list
|
|
||||||
gravity_generateLocalList
|
|
||||||
|
|
||||||
# Update gravity timestamp
|
# Update gravity timestamp
|
||||||
update_gravity_timestamp
|
update_gravity_timestamp
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue