Posted on 04-07-2017 02:26 PM
I'm looking at some scenarios where it would be nice to have a script ran when certain network or local drives are mounted or unmounted. Has anyone done something like this? If so, how? I'm not quite sure where to start.
Posted on 04-08-2017 09:00 AM
One place to start would be to look at a LaunchAgent (these run in the user space) that would use the StartOnMount key. This triggers the LaunchAgent to run whatever script or processes you specify whenever the OS sees a share get mounted.