config/misc/99-no-wifi-on-ethernet

12 lines
186 B
Bash
Executable File

#!/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