[OpenWrt-Devel] [procd] How to redirect STDOUT/STDERR of a started service ?

John Crispin blogic at openwrt.org
Sun Dec 14 13:42:25 EST 2014



On 14/12/2014 19:27, Christian Schoenebeck wrote:
> Hi, I provided privoxy 3.0.22 package with scripts using procd to
> run the service. When privoxy runs in foreground it never writes to
> logfile. So it's required to redirect stdout and/or stderr of this
> started service to a file. I asked the developers of privoxy how to
> fix this. I got a tip to create a patch for privoxy to fix this
> problem but it's not supported.
> 
> I think there must be a chance to give parameters to procd to
> redirect STDOUT/STDERR.
> 
> I tried procd_append_param command '>/var/log/out.log' and 
> procd_append_param command '2>/var/log/error.log'
> 
> without and with single and double quotes without success. The
> service did not start without any errors reported neither from the
> service nor from procd. If I redirect from the command line
> everything works fine.
> 
> What did I wrong ? How to debug whats going on ?
> 
> Thanks for support Christian 
> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 

Hi,

that wont work i am afraid. logging to a file is a bit quirky as the
log wont rotate and eventually fill up /tmp. i will look into this
during the week and add an option to redirect stdout to the syslog.

	John
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list