Skip to content

Commit

Permalink
use function in install script
Browse files Browse the repository at this point in the history
  • Loading branch information
PromoFaux committed May 2, 2017
1 parent 9c136a5 commit 61ec772
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions automated install/basic-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1413,9 +1413,8 @@ main() {
pw=""
if [[ $(grep 'WEBPASSWORD' -c /etc/pihole/setupVars.conf) == 0 ]] ; then
pw=$(tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c 8)
hash=$(echo -n ${pw} | sha256sum | sed 's/\s.*$//' | sha256sum | sed 's/\s.*$//')
hash=$(echo -n ${hash} | sha256sum | sed 's/\s.*$//')
echo "WEBPASSWORD=$(echo -n ${pw} | sha256sum | sed 's/\s.*$//' | sha256sum | sed 's/\s.*$//')" >> ${setupVars}
. /opt/pihole/webpage.sh
echo "WEBPASSWORD=$(HashPassword ${1})
fi
fi
Expand Down

0 comments on commit 61ec772

Please sign in to comment.