# 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=" # Set the user and group ID that you want to run the command as, as well as the umask. The user will be randomly # generated. This is mostly so that files written by the command in any directory shared with the host will have the # right IDs. USER_ID=0 GROUP_ID=0 UMASK=0 # This is a very good idea if your command modifies the WATCH_DIR in any way. You can easily trigger yourself because # most programs don't worry about checking the current state before making a change. e.g. chmod will set the mode of a # file even if it already has that mode. IGNORE_EVENTS_WHILE_COMMAND_IS_RUNNING=1 # Set to true to use polling to detect changes. For non-linux file systems, such as Windows shares, you must use polling. USE_POLLING=no # Set this to 1 to log all events, for debugging purposes. WARNING! This creates copious amounts of confusing logging! DEBUG=0