REVISIT: Remove some references to setupVars (some files can probably go entirely...)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2023-02-11 12:51:55 +00:00
parent a91eb48d48
commit c0e352094d
No known key found for this signature in database
5 changed files with 6 additions and 16 deletions

View file

@ -12,6 +12,8 @@
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
# TODO - this entire file might be able to be removed in v6
readonly dnsmasqconfig="/etc/dnsmasq.d/01-pihole.conf"
readonly dhcpconfig="/etc/dnsmasq.d/02-pihole-dhcp.conf"
readonly FTLconf="/etc/pihole/pihole-FTL.conf"
@ -175,10 +177,8 @@ SetWebPassword() {
fi
if [ "${PASSWORD}" == "${CONFIRM}" ] ; then
# We do not wrap this in brackets, otherwise BASH will expand any appropriate syntax
hash=$(HashPassword "$PASSWORD")
# Save hash to file
setFTLConfigValue "webserver.api.pwhash" "${hash}" >/dev/null
# pihole-FTL will automatically hash the password
setFTLConfigValue "webserver.api.password" "${PASSWORD}" >/dev/null
echo -e " ${TICK} New password set"
else
echo -e " ${CROSS} Passwords don't match. Your password has not been changed"