.TH INOTICOMING 1 "2007-08-18" "inoticoming" INOTICOMING .SH NAME inoticoming \- trigger actions when files hit an incoming directory .SH SYNOPSIS .B inoticoming [ \fIglobal-options\fP ] .I directory .IR actions * .SH DESCRIPTION Inoticoming is a daemon to watch a \fIdirectory\fP with Linux's inotify framework and trigger \fIactions\fP once files with specific names are placed in there. For example it can be used to wait for \fB.changes\fP files uploaded into a directory and call \fBreprepro\fP to put them into your repository. .SH "GLOBAL OPTIONS" .TP .B \-\-foreground Do not fork, but stay in the foreground and log to stderr. .TP .B \-\-logfile \fIfilename\fP After forking in the background, log to the specified .I filename instead of syslog. .TP .B \-\-pid\-file \fIfilename\fP Write the pid of the running instance into \fIfilename\fP. .TP .B \-\-initialsearch First search the directory for files already existing and process them with the given rules as if they just appeared. If files show up in this inital phase, they may be processed twice, but should never be missed. (Unless they are too many and the inotify queue overflows). .SH "ACTIONS" Each action description is an optional list of options for this action (which files to call it for, what directory to change into before executing it, ...), followed by the command and its arguments ended with a single ; as argument. Like: .br .B inoticoming \-\-foreground / \-\-regexp ^v echo There appeared {} in the root directory. \e; (Note that the \e before the ; is needed if and only if you calling it from a shell or anything else interpreting the ; on its own). .SS "ACTION OPTIONS" .TP .B \-\-prefix \fIstring\fP Only trigger this action, if the filename starts with the specified string. .TP .B \-\-suffix \fIstring\fP Only trigger this action, if the filename ends with the specified string. .TP .B \-\-regexp \fIregular expression\fP Only trigger this action, if the filename matches the specified regular expression. .TP .B \-\-chdir \fIdirectory\fP Change into \fIdirectory\fP before executing the specified commands. (Note that since it is a well-behaved daemon, its working directory is \fB/\fP which will be inherited by all actions). .TP .B \-\-stdout\-to\-log Redirect the command's output (stdout) to the logfile. .TP .B \-\-stderr\-to\-log Redirect the command's error output (stderr) to the logfile. .SH EXAMPLES .TP .B inoticoming \-\-logfile logs/ilog \-\-pid\-file pid \fI$INCOMINGDIR\fP \-\-suffix .changes \-\-stderr\-to\-log reprepro \-s \-b \fI$REPREPROBASEDIR\fP \-\-waitforlock 1000 processincoming \fIrulename\fP {} \e; This will call reprepro for every new .changes file. Note that giving {} as argument to processincoming (which inoticoming will replace with the filename) so that only that .changes file is processed and reprepro will not complain about a possible other yet incomplete .changes file is only available starting with reprepro version 2.2.2. .SH PROBLEMS There is no handling of queue overflows yet. .SH "REPORTING BUGS" Report bugs or wishlist requests to the Debian BTS .br (e.g. by using \fBreportbug inoticoming\fP under Debian) .br or directly to . .SH COPYRIGHT Copyright \(co 2007 Bernhard R. Link .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.