Fix for latest Pi-hole FTL version

This commit is contained in:
William Brawner 2023-01-01 23:54:53 +00:00
parent b9581246d5
commit 828d6bd70c
2 changed files with 4 additions and 1 deletions

View file

@ -16,7 +16,7 @@ services:
network_mode: service:pihole network_mode: service:pihole
user: node user: node
pihole: pihole:
image: pihole/pihole image: pihole/pihole:2022.12
environment: environment:
WEBPASSWORD: pihole WEBPASSWORD: pihole
restart: unless-stopped restart: unless-stopped

View file

@ -80,6 +80,9 @@ function get(url: URL, callback: (data: string) => void, error?: (error?: Error)
function status(callback: (status: any) => void) { function status(callback: (status: any) => void) {
let url = new URL(`${pihole}/admin/api.php`) 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 => { get(url, data => {
let dataObj = JSON.parse(data) let dataObj = JSON.parse(data)
if (dataObj.status === 'disabled') { if (dataObj.status === 'disabled') {