Media Watchdog Script for XBMC on Ubuntu Linux
A tiny script to have your video- or music library updated when ever a new file is added or modified / removed
from one of the folders which are watched.
Uses inotify and xbmc-send. Tested on Ubuntu 10.04.
Just download the script and run it manually or in background after changing the path variables in the script.
from one of the folders which are watched.
Uses inotify and xbmc-send. Tested on Ubuntu 10.04.
Just download the script and run it manually or in background after changing the path variables in the script.
Ein kleines Skript, welches anzugebende Ordner auf Veränderungen überwacht. Werden Dateien modifiziert (also hinzugefügt, gelöscht oder umbenannt) wird ein Update der XBMC Medienbibliothek getriggert. Ich habe es auf einem Ubuntu 10.04 am laufen, funktioniert einwandfrei ![]()
Einfach das Skript runterladen und dann manuell oder im Hintergrund ausführen (nachdem man die Pfade im Skript angepasst hat).

So I just run this script once lets say by adding ./monitorscript to bash_login . Will it continue to run endlessley, I didn’t understand all the code but there doesn’t seem to be a loop.
Also it seems I need inotify. I can;t find this in the repositories, where does it come from?
Can this script be run as a daemon?
The output of inotifywait is piped to “while read line”, that’s an endless loop
To use inotifywait, you need to install the package inotify-tools from the ubuntu universe/misc repos. I did not try to run the script as a daemon, but I thik that should work as well.