; ---------------------- ; General Settings ; ---------------------- [DEFAULT] ; where to store output logfile=/var/log/watcher.log ; where to save the PID file pidfile=/var/run/watcher.pid ; ---------------------- ; Job Setups ; ---------------------- [job1] ; directory or file to watch. Probably should be abs path. watch=/home/storage ; 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 ; if true, watcher will monitor directories recursively for changes recursive=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) command=/home/fixperm.sh $filename