I have a 2014 retina Macbook Pro running Yosemite (10.10.3). I would like to run a script whenever a certain network interface is connected. Is there a hook or trigger I can use? I have a shell script that will perform the actions I want to perform, I just need to know how to trigger it.

1 Answer 1


There's a great utility called ControlPlane that allows you to trigger all kinds of events based on the context of system rules you set.

from the about page on the site: http://www.controlplaneapp.com

ControlPlane determines where you are or what you are doing based on a number of available evidence sources and then automatically reconfigures your Mac based on your preferences. Evidence sources can include your current location, visible WiFi networks, attached USB devices, running applications and more.

  • Thanks @rchrdg I'll look at Control Plane. What I am really looking for are the hooks or triggers that Control Plane utilizes.
    – Scott
    Commented Jun 19, 2015 at 10:06
  • Scott the entire app is open source and you can see the code on Github. Ill bet any specific hooks are easier to figure out if you review that.
    – rchrdg
    Commented Nov 25, 2015 at 2:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .