Run command after mount/unmout usb pen drive

Viewed 4886

I have Raspberry Pi (with Raspbian) and using it as DLNA/UPnP server and renderer. I run minidlna as DLNA server and i have some media files on USB.

I would like to automaticaly rebuild DLNA DB when drive is mounted and unmounted. This is done by command:

sudo service minidlna force-reload

Is threre any way how to autorun this command?

BTW I use "USBmount" package for automount USB drives.

Thanx

2 Answers
Related