From 3035c9a366e2816397df3ab85e7abc8f2418cee3 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 23 May 2017 10:44:11 +0200 Subject: [PATCH] Refine output of password status in basic-install.sh:displayFinalMessage(). Fixes #1488 (#1490) --- automated install/basic-install.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 5d893067..15fd93be 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1129,10 +1129,18 @@ checkSelinux() { displayFinalMessage() { + if [[ ${#1} -gt 0 ]] ; then + pwstring="$1" + elif [[ $(grep 'WEBPASSWORD' -c /etc/pihole/setupVars.conf) -gt 0 ]]; then + pwstring="unchanged" + else + pwstring="NOT SET" + fi + if [[ ${INSTALL_WEB} == true ]]; then additional="View the web interface at http://pi.hole/admin or http://${IPV4_ADDRESS%/*}/admin -Your Admin Webpage login password is ${1:-"NOT SET"}" +Your Admin Webpage login password is ${pwstring}" fi # Final completion message to user