mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-23 15:50:19 +00:00
Merge dev > FTLDNS fix merge conflicts
Signed-off-by: Adam Warner <adamw@rner.email>
This commit is contained in:
commit
310d33b8ee
9 changed files with 34 additions and 68 deletions
|
@ -687,13 +687,13 @@ setStaticIPv4() {
|
|||
elif [[ -f "/etc/sysconfig/network-scripts/ifcfg-${PIHOLE_INTERFACE}" ]];then
|
||||
# If it exists,
|
||||
IFCFG_FILE=/etc/sysconfig/network-scripts/ifcfg-${PIHOLE_INTERFACE}
|
||||
IPADDR=$(echo "${IPV4_ADDRESS}" | cut -f1 -d/)
|
||||
# check if the desired IP is already set
|
||||
if grep -q "${IPV4_ADDRESS}" "${IFCFG_FILE}"; then
|
||||
if grep -q "${IPADDR}" "${IFCFG_FILE}"; then
|
||||
echo -e " ${INFO} Static IP already configured"
|
||||
# Otherwise,
|
||||
else
|
||||
# Put the IP in variables without the CIDR notation
|
||||
IPADDR=$(echo "${IPV4_ADDRESS}" | cut -f1 -d/)
|
||||
CIDR=$(echo "${IPV4_ADDRESS}" | cut -f2 -d/)
|
||||
# Backup existing interface configuration:
|
||||
cp "${IFCFG_FILE}" "${IFCFG_FILE}".pihole.orig
|
||||
|
@ -768,6 +768,8 @@ setDNS() {
|
|||
Comodo ""
|
||||
DNSWatch ""
|
||||
Quad9 ""
|
||||
FamilyShield ""
|
||||
Cloudflare ""
|
||||
Custom "")
|
||||
# In a whiptail dialog, show the options
|
||||
DNSchoices=$(whiptail --separate-output --menu "Select Upstream DNS Provider. To use your own, select Custom." ${r} ${c} 7 \
|
||||
|
@ -814,6 +816,16 @@ setDNS() {
|
|||
PIHOLE_DNS_1="9.9.9.9"
|
||||
PIHOLE_DNS_2="149.112.112.112"
|
||||
;;
|
||||
FamilyShield)
|
||||
echo "FamilyShield servers"
|
||||
PIHOLE_DNS_1="208.67.222.123"
|
||||
PIHOLE_DNS_2="208.67.220.123"
|
||||
;;
|
||||
Cloudflare)
|
||||
echo "Cloudflare servers"
|
||||
PIHOLE_DNS_1="1.1.1.1"
|
||||
PIHOLE_DNS_2="1.0.0.1"
|
||||
;;
|
||||
Custom)
|
||||
# Until the DNS settings are selected,
|
||||
until [[ "${DNSSettingsCorrect}" = True ]]; do
|
||||
|
@ -1384,22 +1396,8 @@ installCron() {
|
|||
# Gravity is a very important script as it aggregates all of the domains into a single HOSTS formatted list,
|
||||
# which is what Pi-hole needs to begin blocking ads
|
||||
runGravity() {
|
||||
echo ""
|
||||
echo -e " ${INFO} Preparing to run gravity.sh to refresh hosts..."
|
||||
# If cached lists exist,
|
||||
if ls /etc/pihole/list* 1> /dev/null 2>&1; then
|
||||
echo -e " ${INFO} Cleaning up previous install (preserving whitelist/blacklist)"
|
||||
# remove them
|
||||
rm /etc/pihole/list.*
|
||||
fi
|
||||
# If the default ad lists file exists,
|
||||
if [[ ! -e /etc/pihole/adlists.default ]]; then
|
||||
# copy it over from the local repo
|
||||
cp ${PI_HOLE_LOCAL_REPO}/adlists.default /etc/pihole/adlists.default
|
||||
fi
|
||||
echo -e " ${INFO} Running gravity.sh"
|
||||
# Run gravity in the current shell
|
||||
{ /opt/pihole/gravity.sh; }
|
||||
{ /opt/pihole/gravity.sh --force; }
|
||||
}
|
||||
|
||||
# Check if the pihole user exists and create if it does not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue