mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-19 05:40:13 +00:00
Add partial matching hint if exact matching found nothing
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
a2951cd3b8
commit
4df7cee6c2
2 changed files with 11 additions and 3 deletions
|
@ -74,7 +74,7 @@ TestAPIAvailability() {
|
|||
fi
|
||||
}
|
||||
|
||||
Authentication() {
|
||||
LoginAPI() {
|
||||
# Try to read the CLI password (if enabled and readable by the current user)
|
||||
if [ -r /etc/pihole/cli_pw ]; then
|
||||
password=$(cat /etc/pihole/cli_pw)
|
||||
|
@ -96,7 +96,7 @@ Authentication() {
|
|||
|
||||
}
|
||||
|
||||
LoginAPI() {
|
||||
Authentication() {
|
||||
sessionResponse="$(curl -skS -X POST "${API_URL}auth" --user-agent "Pi-hole cli " --data "{\"password\":\"${password}\"}" )"
|
||||
|
||||
if [ -z "${sessionResponse}" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue