Skip to content

Commit

Permalink
DHCP is a top level config object
Browse files Browse the repository at this point in the history
  • Loading branch information
yubiuser committed Jul 14, 2024
1 parent a0054e8 commit 81f2949
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions padd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -422,19 +422,19 @@ GetNetworkInformation() {
fi

# Is Pi-Hole acting as the DHCP server?
DHCP_ACTIVE="$(echo "${config}" | jq .config.dns.dhcp.active 2>/dev/null )"
DHCP_ACTIVE="$(echo "${config}" | jq .config.dhcp.active 2>/dev/null )"

if [ "${DHCP_ACTIVE}" = "true" ]; then
DHCP_START="$(echo "${config}" | jq --raw-output .config.dns.dhcp.start 2>/dev/null)"
DHCP_END="$(echo "${config}" | jq --raw-output .config.dns.dhcp.end 2>/dev/null)"
DHCP_START="$(echo "${config}" | jq --raw-output .config.dhcp.start 2>/dev/null)"
DHCP_END="$(echo "${config}" | jq --raw-output .config.dhcp.end 2>/dev/null)"

dhcp_status="Enabled"
dhcp_info=" Range: ${DHCP_START} - ${DHCP_END}"
dhcp_heatmap=${green_text}
dhcp_check_box=${check_box_good}

# Is DHCP handling IPv6?
DHCP_IPv6="$(echo "${config}" | jq --raw-output .config.dns.dhcp.ipv6 2>/dev/null)"
DHCP_IPv6="$(echo "${config}" | jq --raw-output .config.dhcp.ipv6 2>/dev/null)"
if [ "${DHCP_IPv6}" = "true" ]; then
dhcp_ipv6_status="Enabled"
dhcp_ipv6_heatmap=${green_text}
Expand Down

0 comments on commit 81f2949

Please sign in to comment.