Subversion Repositories public

Rev

Rev 69 | Rev 102 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
45 luk 1
 
2
3
 
100 luk 4
45 luk 5
 
6
2. Requirements
7
3. How to use
8
4. Bugs, suggestions
9
5. Licensing
10
6. Documentation
11
12
 
13
 
14
15
 
16
 
17
This program is the "inotify cron" system. It consist of a daemon and
18
a table manipulator. You can use it a similar way as the regular cron.
19
The difference is that the inotify cron handles filesystem events
20
rather than time periods.
21
22
 
23
* Linux kernel 2.6.13 or later (with inotify compiled in)
24
* inotify headers (inotify.h, sometimes inotify-syscalls.h) installed in
55 luk 25
  <INCLUDE_DIR>/sys. The most common place is /usr/include/sys.
45 luk 26
* GCC 4.x compiler (probably works also with GCC 3.4, possibly with
27
  older versions too)
28
29
 
30
 
31
Because this version is very early it does not contain a standard
32
portable build mechanism. There is only a Makefile which must be
33
modified manually. On many Linux systems you need not to change
34
anything.
35
36
 
37
check the PREFIX and other common variables. If done you can
38
now build the files ('make').
39
40
 
57 luk 41
45 luk 42
 
69 luk 43
file simply rename it from /etc/incron.conf.example to
44
/etc/incron.conf (you can also use -f <config> for one-time
45
use of a custom configuration file).
46
45 luk 47
 
69 luk 48
 
45 luk 49
The incron daemon (incrond) must be run under root (typically from
50
runlevel script etc.). It loads the current user tables and hooks
51
them for later changes.
52
53
 
54
since it SUIDs. For manipulation with the tables use basically
55
the same syntax as for the crontab program. You can import a table,
56
remove and edit the current table.
57
58
 
59
 <path> <mask> <command>
60
61
 
62
63
 
64
  <mask> is a symbolic (see inotify.h; use commas for separating
65
         symbols) or numeric mask for events
66
  <command> is an application or script to run on the events
67
68
 
69
70
 
71
  $@ - the watched filesystem path (see above)
72
  $# - the event-related file name
73
  $% - the event flags (textually)
55 luk 74
  $& - the event flags (numerically)
75
45 luk 76
 
47 luk 77
disables events occurred during the event handling (to avoid loops).
78
79
 
55 luk 80
an argument every time a file is changed in /var/mail. One of
45 luk 81
the solutions follows:
82
83
 
84
85
 
55 luk 86
the first argument and the numeric event flags as the second one.
87
It have to monitor all events on files in /tmp. Here is it:
88
45 luk 89
 
55 luk 90
91
 
67 luk 92
/etc/incron.d and their commands use root privileges. System tables
93
are intended to be changed directly (without incrontab).
94
55 luk 95
 
69 luk 96
the configuration. See the example file for more information.
97
67 luk 98
 
69 luk 99
 
45 luk 100
THIS PROGRAM IS AN ALPHA VERSION. IT PROBABLY CONTAINS BUGS AND
101
THEREFORE IT IS NOT INTENDED FOR PRODUCTION USE.
102
103
 
104
please use the bug tracking system at http://bts.aiken.cz.
105
106
 
107
 
108
This program is free software; you can redistribute it and/or
109
modify it under the terms of the GNU General Public License,
110
version 2  (see LICENSE-GPL).
111
112
 
57 luk 113
Please look into the source files for detailed information.
45 luk 114