mirror of
https://github.com/pi-hole/pi-hole
synced 2025-02-22 13:02:02 +00:00
Merge pull request #1811 from bcambl/nmcli_check
check NetworkManager status prior to using the cli (#1653)
This commit is contained in:
commit
af59824819
@ -709,8 +709,8 @@ setStaticIPv4() {
|
|||||||
}> "${IFCFG_FILE}"
|
}> "${IFCFG_FILE}"
|
||||||
# Use ip to immediately set the new address
|
# Use ip to immediately set the new address
|
||||||
ip addr replace dev "${PIHOLE_INTERFACE}" "${IPV4_ADDRESS}"
|
ip addr replace dev "${PIHOLE_INTERFACE}" "${IPV4_ADDRESS}"
|
||||||
# If NetworkMangler command line interface exists,
|
# If NetworkMangler command line interface exists and ready to mangle,
|
||||||
if command -v nmcli &> /dev/null;then
|
if command -v nmcli &> /dev/null && nmcli general status &> /dev/null; then
|
||||||
# Tell NetworkManagler to read our new sysconfig file
|
# Tell NetworkManagler to read our new sysconfig file
|
||||||
nmcli con load "${IFCFG_FILE}" > /dev/null
|
nmcli con load "${IFCFG_FILE}" > /dev/null
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user