whiptail --msgbox --backtitle "Plea" --title "Free and open source""The Pi-hole is free, but powered by your donations: http://pi-hole.net/donate"$r$c
# Explain the need for a static address
whiptail --msgbox --backtitle "Initating network interface" --title "Static IP Needed""The Pi-hole is a SERVER so it needs a STATIC IP ADDRESS to function properly.
whiptail --msgbox --backtitle "Initating network interface" --title "Static IP Needed""The Pi-hole is a SERVER so it needs a STATIC IP ADDRESS to function properly.
In the next section, you can choose to use your current network settings (DHCP) or to manually edit them."$r$c
}
@ -119,12 +119,12 @@ welcomeDialogs() {
verifyFreeDiskSpace(){
# 50MB is the minimum space needed (45MB install (includes web admin bootstrap/jquery libraries etc) + 5MB one day of logs.)
whiptail --msgbox --backtitle "Insufficient Disk Space" --title "Insufficient Disk Space""\nYour system appears to be low on disk space. pi-hole recomends a minimum of $requiredFreeBytes Bytes.\nYou only have $existingFreeBytes Free.\n\nIf this is a new install you may need to expand your disk.\n\nTry running:\n 'sudo raspi-config'\nChoose the 'expand file system option'\n\nAfter rebooting, run this installation again.\n\ncurl -L install.pi-hole.net | bash\n"$r$c
echo"$existingFreeBytes is less than $requiredFreeBytes"
piholeDNS=$(whiptail --backtitle "Specify Upstream DNS Provider(s)" --inputbox "Enter your desired upstream DNS provider(s), seperated by a comma.\n\nFor example '8.8.8.8, 8.8.4.4'"$r$c"$prePopulate" 3>&1 1>&2 2>&3)
if[[$?=0]];then
piholeDNS1=$(echo$piholeDNS| sed 's/[, \t]\+/,/g'| awk -F, '{print$1}')
piholeDNS2=$(echo$piholeDNS| sed 's/[, \t]\+/,/g'| awk -F, '{print$2}')
whiptail --msgbox --backtitle "Invalid IP" --title "Invalid IP""One or both entered IP addresses were invalid. Please try again.\n\n DNS Server 1: $piholeDNS1\n DNS Server 2: $piholeDNS2"$r$c
whiptail --msgbox --backtitle "Invalid IP" --title "Invalid IP""One or both entered IP addresses were invalid. Please try again.\n\n DNS Server 1: $piholeDNS1\n DNS Server 2: $piholeDNS2"$r$c
if[[$piholeDNS1==$strInvalid]];then
piholeDNS1=""
fi
if[[$piholeDNS2==$strInvalid]];then
piholeDNS2=""
fi
DNSSettingsCorrect=False
else
else
if(whiptail --backtitle "Specify Upstream DNS Provider(s)" --title "Upstream DNS Provider(s)" --yesno "Are these settings correct?\n DNS Server 1: $piholeDNS1\n DNS Server 2: $piholeDNS2"$r$c)then