9ba8b65
#!/bin/bash
9ba8b65
e812a0f
INTERFACE=$1 # The interface which is brought up or down
e812a0f
STATUS=$2 # The new state of the interface
9ba8b65
e812a0f
# whenever interface is brought up by NM (rhbz #565921)
e812a0f
if [ "$STATUS" = "up" ]; then
e812a0f
    # restart the services
e812a0f
    systemctl -q is-enabled dhcpd.service && systemctl restart dhcpd.service
e812a0f
    systemctl -q is-enabled dhcpd6.service && systemctl restart dhcpd6.service
9ba8b65
fi
30b7632
30b7632
exit 0