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