DRY `displayFinalMessage`

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2017-01-01 07:10:14 -08:00
parent 8be37130e9
commit 7750e1344c
No known key found for this signature in database
GPG Key ID: 572E999E385B7BFC
1 changed files with 2 additions and 13 deletions

View File

@ -966,29 +966,18 @@ checkSelinux() {
} }
displayFinalMessage() { displayFinalMessage() {
if (( ${#1} > 0 )) ; then
# Final completion message to user # Final completion message to user
whiptail --msgbox --backtitle "Make it so." --title "Installation Complete!" "Configure your devices to use the Pi-hole as their DNS server using: whiptail --msgbox --backtitle "Make it so." --title "Installation Complete!" "Configure your devices to use the Pi-hole as their DNS server using:
IPv4: ${IPV4_ADDRESS%/*} IPv4: ${IPV4_ADDRESS%/*}
IPv6: ${IPV6_ADDRESS} IPv6: ${IPV6_ADDRESS:-"Not Configured"}
If you set a new IP address, you should restart the Pi. If you set a new IP address, you should restart the Pi.
The install log is in /etc/pihole. The install log is in /etc/pihole.
View the web interface at http://pi.hole/admin or http://${IPV4_ADDRESS%/*}/admin View the web interface at http://pi.hole/admin or http://${IPV4_ADDRESS%/*}/admin
The currently set password is ${1}" ${r} ${c}
else
whiptail --msgbox --backtitle "Make it so." --title "Installation Complete!" "Configure your devices to use the Pi-hole as their DNS server using:
IPv4: ${IPV4_ADDRESS%/*} Your Admin Webpage login password is ${1:-"NOT SET"}" ${r} ${c}
IPv6: ${IPV6_ADDRESS}
If you set a new IP address, you should restart the Pi.
The install log is in /etc/pihole.
View the web interface at http://pi.hole/admin or http://${IPV4_ADDRESS%/*}/admin" ${r} ${c}
fi
} }
update_dialogs() { update_dialogs() {