Fix for latest Pi-hole FTL version
This commit is contained in:
parent
b9581246d5
commit
828d6bd70c
2 changed files with 4 additions and 1 deletions
|
@ -16,7 +16,7 @@ services:
|
|||
network_mode: service:pihole
|
||||
user: node
|
||||
pihole:
|
||||
image: pihole/pihole
|
||||
image: pihole/pihole:2022.12
|
||||
environment:
|
||||
WEBPASSWORD: pihole
|
||||
restart: unless-stopped
|
||||
|
|
|
@ -80,6 +80,9 @@ function get(url: URL, callback: (data: string) => void, error?: (error?: Error)
|
|||
|
||||
function status(callback: (status: any) => void) {
|
||||
let url = new URL(`${pihole}/admin/api.php`)
|
||||
url.searchParams.append('auth', apiKey)
|
||||
url.searchParams.append('summary', '')
|
||||
console.log(`GET ${url.toString()}`)
|
||||
get(url, data => {
|
||||
let dataObj = JSON.parse(data)
|
||||
if (dataObj.status === 'disabled') {
|
||||
|
|
Loading…
Reference in a new issue