-
Notifications
You must be signed in to change notification settings - Fork 0
/
watcher.ini
83 lines (70 loc) · 2.64 KB
/
watcher.ini
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
; ----------------------
; General Settings for inotify Watcher (https://github.com/klemens-u/Watcher-Python3)
; Typical file location: /etc/watcher.ini
; ----------------------
[DEFAULT]
; where to store output
logfile=/var/log/watcher.log
; where to save the PID file
pidfile=/tmp/watcher.pid
; ----------------------
; Job Setups
; ----------------------
;[job1]
; directory or file to watch. Probably should be abs path.
;watch=/tmp
; list of events to watch for.
; supported events:
; 'access' - File was accessed (read) (*)
; 'attribute_change' - Metadata changed (permissions, timestamps, extended attributes, etc.) (*)
; 'write_close' - File opened for writing was closed (*)
; 'nowrite_close' - File not opened for writing was closed (*)
; 'create' - File/directory created in watched directory (*)
; 'delete' - File/directory deleted from watched directory (*)
; 'self_delete' - Watched file/directory was itself deleted
; 'modify' - File was modified (*)
; 'self_move' - Watched file/directory was itself moved
; 'move_from' - File moved out of watched directory (*)
; 'move_to' - File moved into watched directory (*)
; 'open' - File was opened (*)
; 'all' - Any of the above events are fired
; 'move' - A combination of 'move_from' and 'move_to'
; 'close' - A combination of 'write_close' and 'nowrite_close'
;
; When monitoring a directory, the events marked with an asterisk (*) above
; can occur for files in the directory, in which case the name field in the
; returned event data identifies the name of the file within the directory.
;events=create,delete
; Comma separated list of excluded dir. Absolute path needed.
; Leave blank if no excluded dir setted
;excluded=
; if true, watcher will monitor directories recursively for changes
;recursive=true
; if true, watcher will automatically watch new subdirectory
;autoadd=true
; the command to run. Can be any command. It's run as whatever user started watcher.
; The following wildards may be used inside command specification:
; $$ dollar sign
; $watched watched filesystem path (see above)
; $filename event-related file name
; $tflags event flags (textually)
; $nflags event flags (numerically)
; $cookie event cookie (integer used for matching move_from and move_to events, otherwise 0)
;command=ls -l $filename
;
;
; Add one job per nextcloud user
[admin]
watch=/srv/nextcloud/admin/files
events=create,modify,delete,self_move,move
excluded=
recursive=true
autoadd=true
command=/usr/local/bin/watcher_nextcloud.sh $watched $filename
[user1]
watch=/srv/nextcloud/user1/files
events=create,modify,delete,self_move,move
excluded=
recursive=true
autoadd=true
command=/usr/local/bin/watcher_nextcloud.sh $watched $filename