planktoscope/scripts/raspbian_configuration/etc/dhcpcd.enter-hook
2021-11-03 18:05:42 +01:00

9 lines
357 B
Plaintext

if [ "$interface" = "eth0" ] && [ "$if_up" ]; then
systemctl start dnsmasq
if [ "$reason" = "STATIC" ] || [ "$reason" = "TIMEOUT" ] || [ "$reason" = "EXPIRE" ] || [ "$reason" = "NAK" ]; then
systemctl start dnsmasq
elif [ "$reason" = "NOCARRIER" ] || [ "$reason" = "INFORM" ] || [ "$reason" = "DEPARTED" ]; then
systemctl stop dnsmasq
fi
fi