mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-27 07:12:27 +00:00
Convert SetWebPassword to use new FTL config
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
632aead691
commit
019be067d9
1 changed files with 3 additions and 3 deletions
|
@ -77,7 +77,7 @@ deleteFTLsetting() {
|
||||||
}
|
}
|
||||||
|
|
||||||
changeFTLsetting() {
|
changeFTLsetting() {
|
||||||
addOrEditKeyValPair "${FTLconf}" "${1}" "${2}"
|
pihole-FTL --config "${1}" "${2}"
|
||||||
}
|
}
|
||||||
|
|
||||||
add_dnsmasq_setting() {
|
add_dnsmasq_setting() {
|
||||||
|
@ -165,7 +165,7 @@ SetWebPassword() {
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ "${PASSWORD}" == "" ]; then
|
if [ "${PASSWORD}" == "" ]; then
|
||||||
addOrEditKeyValPair "${setupVars}" "WEBPASSWORD" ""
|
setFTLConfigValue "api.pwhash" ""
|
||||||
echo -e " ${TICK} Password Removed"
|
echo -e " ${TICK} Password Removed"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -178,7 +178,7 @@ SetWebPassword() {
|
||||||
# We do not wrap this in brackets, otherwise BASH will expand any appropriate syntax
|
# We do not wrap this in brackets, otherwise BASH will expand any appropriate syntax
|
||||||
hash=$(HashPassword "$PASSWORD")
|
hash=$(HashPassword "$PASSWORD")
|
||||||
# Save hash to file
|
# Save hash to file
|
||||||
addOrEditKeyValPair "${setupVars}" "WEBPASSWORD" "${hash}"
|
setFTLConfigValue "api.pwhash" "${hash}"
|
||||||
echo -e " ${TICK} New password set"
|
echo -e " ${TICK} New password set"
|
||||||
else
|
else
|
||||||
echo -e " ${CROSS} Passwords don't match. Your password has not been changed"
|
echo -e " ${CROSS} Passwords don't match. Your password has not been changed"
|
||||||
|
|
Loading…
Reference in a new issue