Files
docker-inotify-command/sample.conf

29 lines
1.7 KiB
Plaintext

# This is a sample config file, for notifying a SageTV server running on 192.168.1.102 that changes have occurred to the
# media import folder. SageTV will then rescan the folder, adding new media to its library.
# The directory to watch
WATCH_DIR=/dir1
# If we don't see any events for $SETTLE_DURATION time, assume that it's safe to run the command. Format is HH:MM:SS,
# with HH and MM optional.
SETTLE_DURATION=5
# However, if we see a stream of changes for longer than $MAX_WAIT_TIME with no break of $SETTLE_DURATION or more, then
# go ahead and run the command. Otherwise we might be waiting forever for the directory to stop changing. Format is
# HH:MM:SS, with HH and MM optional.
MAX_WAIT_TIME=05:00
# After running the command, wait at least this long before running it again, even if $SETTLE_DURATION time has passed
# after change. This controls the maximum frequency of the command.
MIN_PERIOD=10:00
# This is the command to run when a change is detected. If this command runs quickly and triggers some other
# long-running task, you want to be sure that rerunning this command while the long-running task is in progress won't
# cause any problems. You can also allow this command to wait until the work is done, which will cause it to naturally
# limit its run frequency. (But you might still want to set a longer MIN_PERIOD above in order to prevent back-to-back
# execution.)
# In this example, we call a SageTV remote API to trigger a rescan of the imported media library. The command assumes
# that we've installed the plugin called "sagex-services - SageTV Remote API Services".
COMMAND="wget -nv -O /dev/null --auth-no-challenge http://sage:frey@192.168.1.102:8080/sagex/api?c=RunLibraryImportScan&1="