On Thu, Dec 22, 2016 at 11:22:49AM +0100, Antoine Jacoutot wrote:
> On Wed, Dec 21, 2016 at 05:51:56AM -0700, Landry Breuil wrote:
> > CVSROOT:    /cvs
> > Module name:        ports
> > Changes by: [email protected]  2016/12/21 05:51:56
> > 
> > Log message:
> >     Import riemann 0.2.12, from MAINTAINER Pavel Korovin /p/tristero/se
> >     
> >     Riemann provides low-latency, transient shared state for systems with 
> > many
> >     moving parts.
> >     Riemann aggregates events from your servers and applications with a 
> > powerful
> >     stream processing language. Send an email for every exception raised by 
> > your
> >     code. Track the latency distribution of your web app. See the top 
> > processes
> >     on any host, by memory and CPU. Combine statistics from every Riak node 
> > in
> >     your cluster and forward to Graphite. Send alerts when a key process 
> > fails
> >     to check in. Know how many users signed up right this second.
> >     
> >     ok sthen@
> >     
> >     Status:
> >     
> >     Vendor Tag:     pkorovin
> >     Release Tags:   landry_20161221
> >     
> >     N ports/sysutils/riemann/Makefile
> >     N ports/sysutils/riemann/distinfo
> >     N ports/sysutils/riemann/patches/patch-etc_riemann_config
> >     N ports/sysutils/riemann/patches/patch-bin_riemann
> >     N ports/sysutils/riemann/pkg/riemann.rc
> >     N ports/sysutils/riemann/pkg/DESCR
> >     N ports/sysutils/riemann/pkg/PLIST
> >     
> >     No conflicts created by this import
> 
> The rc.d script is weird, here are some proposed changes:
> - put variable where they belong and follow the template
> - we set rc_bg, so use ${_bg}
> - no need to run in a sub-shell
> - drop daemon_log, the name looks too much like an rc.d variable
> - while here, drop the log file altogether; do we really need it? it's
>   overwritten each time riemann starts

I thought about this recently and i think we need way to redirect stdout
to a logfile for some sucky daemons who just dont know how to log to
syslog or to a file (node.js apps come to my mind...) - and so far, the
only way i found was to override rc_start the same way it's done here,
which feels hackish.

So how about providing this within rc.subr via daemon_log or
daemon_stdout ?

other than that, yes using rc_bg is definitely better, i hadnt seen the
&.

Reply via email to