#!/bin/sh logger -t no-wifi-on-ethernet "Device $1 is $2" if [ "dev:$1:$2" = "dev:eth0:up" ]; then nmcli r wifi off fi if [ "dev:$1:$2" = "dev:eth0:down" ]; then nmcli r wifi on fi