forked from coppit/docker-inotify-command
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.conf
43 lines (34 loc) · 2.39 KB
/
sample.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# 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:[email protected]: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 this to 1 to log all events, for debugging purposes. WARNING! This creates copious amounts of confusing logging!
DEBUG=0