Pipe redirector Code
Status: Beta
Brought to you by:
pokotilenko
File | Date | Author | Commit |
---|---|---|---|
config | 2006-06-18 | pokotilenko | [r4] Fixed bugs: 1508153, 1508155 |
Makefile | 2006-06-15 | pokotilenko | [r2] Added -c config file option and README file |
Makefile.dep | 2006-06-15 | pokotilenko | [r1] Initial Release v0.2 |
OnTest | 2006-06-15 | pokotilenko | [r2] Added -c config file option and README file |
README | 2006-06-15 | pokotilenko | [r3] Forgot to actually add files :) |
Test | 2006-06-18 | pokotilenko | [r4] Fixed bugs: 1508153, 1508155 |
piper.c | 2006-09-01 | pokotilenko | [r8] Fixed filedescriptors leak |
piper.conf.sample | 2006-06-15 | pokotilenko | [r2] Added -c config file option and README file |
svn-commit.tmp | 2006-06-15 | pokotilenko | [r1] Initial Release v0.2 |
Compilation: make clean && make dep && make && make test System-wide Installation: make install then copy /etc/piper.conf.sample to /etc/piper.conf and edit it to cover your needs. Configuration file: By default /etc/piper.conf is read, override with -c configfile option A sample configuration file (piper.conf.sample): Section test input pipe reopen output program logfile piper.log pidfile piper.pid ipipe pipe opgm OnTest EndSection Config file consist of sections. Defferent sections can be used for different tasks to be done by a piper. The piper's -m <mode> is a task too do, e.g if you use piper start -m test, then the "test" config section is used. Each section should contain: input stdin|pipe|program output stdout|pipe|program If input is set to pipe then section should aslo contain: ipipe filename If input is set to program then section should aslo contain: ipgm filename arg1 arg2 ... For output use opipe and opgm If input set to stdin or output set to stdout nothing else required By default piper uses /var/log/piper/piper-<mode>.log for logging and /var/run/piper/piper-<mode>.pid to store pid files. Directories /var/run/piper and /var/log/piper are created if not exist. If piper can't create those directories for some reason it will exit. Logfile and Pidfile can be overriden in per-section basis by: logfile filename pidfile filename