From 0bb0d595c0060216453006c6bd3c64bf453d440b Mon Sep 17 00:00:00 2001 From: David Coppit Date: Wed, 24 Jun 2015 06:38:45 -0400 Subject: [PATCH] Update documentation --- README.md | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index aaed7f4..36f3299 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,36 @@ -# docker-sagetv-rescan +# docker-inotify-command -docker-sagetv-rescan -==================== +docker-inotify-command +====================== -Trigger a SageTV media library rescan whenever a folder changes - -This is a Docker container for triggering a library rescan for [SageTV](http://www.sage.tv/). Whenever the media library -changes, the container will notify SageTV. +This is a Docker container for triggering a command based on changes to a monitored directory. Multiple monitors can be set +up for different directories. Usage ----- -This docker image is available as a [trusted build on the docker index](https://index.docker.io/u/coppit/sagetv-rescan/). +This docker image is available as a [trusted build on the docker index](https://index.docker.io/u/coppit/inotify-command/). Run: -`sudo docker run --name=SageTV-Rescan -d -v /etc/localtime:/etc/localtime -v /config/dir/path:/config:rw -v /media/dir/path:/media coppit/sagetv-rescan` +`sudo docker run --name=inotify-command -d -v /etc/localtime:/etc/localtime -v /config/dir/path:/config:rw -v /media/dir/path:/dir1 coppit/inotify-command` To check the status, run: -`docker logs SageTV-Rescan` +`docker logs inotify-command` -When the container detects a change to the media directory, it will wait for a configurable "max wait time" for changes -to stop for a configurable "stabilization time". It will then notify SageTV to do a rescan, and wait for that rescan to -complete before resuming monitoring of the media directory. +When the container detects a change to a directory, it will invoke the specified command. There are different parameters +for controlling how frequently the command runs in response to changes. Configuration ------------- -When run for the first time, a file named `sagetv-rescan.conf` will be created in the config dir, and the container will exit. -Edit this file, customizing how you want it to run. For example, you might want to increase the stabilization time to -avoid rescanning too frequently. Then restart the container and it will begin monitoring. +When run for the first time, a file named `sample.conf` will be created in the config dir, and the container will exit. +Rename this file, then edit it, customizing how you want the command to run. For example, you might want to increase the +stabilization time and/or minimum period to avoid running the command too frequently. + +Copy the config file to set up multiple monitors. Be sure to also map the appropriate dir1/dir2/etc. to directories on +the host. Up to 20 directories can be monitored. If your commands need to write to directories, you can also configure +them to be used that way as well. + +After creating your conf files, restart the container and it will begin monitoring.