Re: Can I catch outputs of executed commands?

From: Lukas Jelinek - AIKEN <lukas_at_aiken.cz>
Date: Sat, 22 Mar 2008 14:29:43 +0100

Unfortunately, this is currently not possible (as you can read in the
FAQ). This feature will be implemented later. If you need this the only
way is to write a script which will redirect outputs. For example - this
script will be e.g. at /usr/local/bin/myredir.sh:

#!/bin/sh
/var/www/do.php $1 >>/var/www/logs/stuff.log 2>&1

The appropriate incron rule will be modified to:

/var/www/html IN_MOVED_TO /usr/local/bin/myredir.sh $@

I hope that you understand how to use it.

Regards,

Lukas Jelinek

> im watching /var/www/html
> and if something is moved there incron will run /var/www/do.php
> but i want to send all the output to a file /var/www/logs/stuff.log
>
> would this work as a entry in the table?
>
> /var/www/html IN_MOVED_TO /var/www/do.php>>/var/www/logs/stuff.log\
> 2>&1 $@
>
>
> ??
>
Received on Sat Mar 22 2008 - 14:30:48 CET

This archive was generated by hypermail 2.2.0 : Tue Jun 05 2012 - 22:14:21 CEST