Auto scan local media with new pluged USB device

Hallo again,

I’ve got a new problem/challange:

I would like to run automatically: “mopidy local scan” every time a new USB-device is pluged in to the Raspberry Pi.
Therfore i tried to add a new udev rule which execute the following skript:
!/bin/sh pkill mopidy mopidy local scan mopidy
But it just stops mopidy. When i run the script manually, it works as expected.

What else can i do or where is the mistake in my try??

I’am glad about any kind of help!

Did you consider using the Mopidy File extension http://mopidy.readthedocs.org/en/latest/ext/file/. It allows you to play your music without the need for a scan.

No i didn’t noticed this but i will try it now.

Thanks alot for your advice!!

I am a little bit confused…
Is the file extension already installed (together with mopidy)?
If yes, why i can’t set the [file]-settigs in the config-file? (Changes does not appear in mopidy config return)

Or if no, how can I install it?
apt-cache search mopidy does not return any according entry.

EDIT: Ok, just see that i need mopidy 1.1.0…