Can I disable wifi automatically if there is an ethernet connection?
You have several solutions:


https://gist.github.com/albertbori/1798d88a93175b9da00b



  This is a bash script that will automatically turn your wifi off if
  you connect your computer to an ethernet connection and turn wifi back
  on when you unplug your ethernet cable/adapter. If you decide to turn
  wifi on for whatever reason, it will remember that choice. This was
  improvised from this mac hint to work with Yosemite, and without
  hard-coding the adapter names. It's supposed to support growl, but I
  didn't check that part. I did, however, add OSX notification center
  support. Feel free to fork and fix any issues you encounter.



https://macperformanceguide.com/blog/2014/20141118_0958-OSX_Yosemite-disable-WIFI.html
The associated google search :


https://www.google.fr/search?client=safari&amp;rls=en&amp;q=disable+wifi+if+ethernet+osx&amp;ie=UTF-8&amp;oe=UTF-8&amp;gfe_rd=cr&amp;ei=VL_cWMj1B-zUXt3CkLAM