Run a script on disk unmount

by Mandragor   Last Updated July 16, 2018 17:01 PM

I'd like to run a script on every drive unmount on macos and log the (usb) port and device id of the unmounted drive. Can this be done via launchd or other means?

Related Questions

macOS Sierra: reload firewall when network changes

Updated August 26, 2017 08:01 AM

osx launchd high cpu usage

Updated June 02, 2017 14:01 PM

Can't get launchd plist run successfully in Mac OS X

Updated September 26, 2017 10:01 AM

inotifywait alternative command for Mac?

Updated September 30, 2018 18:01 PM