mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
check NetworkManager status prior to using the cli (#1653)
Closes #1653 Signed-off-by: bcambl <blayne@blaynecampbell.com>
This commit is contained in:
parent
472f7725c7
commit
f89d69b081
1 changed files with 2 additions and 2 deletions
|
@ -709,8 +709,8 @@ setStaticIPv4() {
|
|||
}> "${IFCFG_FILE}"
|
||||
# Use ip to immediately set the new address
|
||||
ip addr replace dev "${PIHOLE_INTERFACE}" "${IPV4_ADDRESS}"
|
||||
# If NetworkMangler command line interface exists,
|
||||
if command -v nmcli &> /dev/null;then
|
||||
# If NetworkMangler command line interface exists and ready to mangle,
|
||||
if command -v nmcli &> /dev/null && nmcli general status &> /dev/null; then
|
||||
# Tell NetworkManagler to read our new sysconfig file
|
||||
nmcli con load "${IFCFG_FILE}" > /dev/null
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue