On Fri, Jul 24, 2020 at 02:11:53AM -0000, Dimitri Karamazov wrote:
> Hey,
>    I'm working with a port quark which hasn't been released yet.
>    It's a simple web server which serves static pages.
>    It works great, but the rc script doesn't execute quite well when starting.
>    The program by default, logs every request, error on the terminal it is 
> called in. (no daemon mode)
>    rc script doesn't handle that well (timeout) on rc_start, program works 
> anyway.
>    Is there a way it can forward the log to /var/log/daemon and exit, or just 
> exit(on the rc side)?
>    or a compatibility with syslog is required? idk who controls the logging.
>    Is daemon mode a necessity for a program executed by rc?
> 
> The rc-script: /etc/rc.d/quark
> #!/bin/ksh
> #
> # $OpenBSD: rc.template,v 1.12 2018/01/11 19:30:18 rpe Exp $
> 
> daemon="/usr/local/bin/quark"
> daemon_flags="-p 80 -d /var/www/quark -u www -g www"
> 
> . /etc/rc.d/rc.subr
> 
> rc_cmd $1

Use rc_bg as documented in rc.subr(8).
For the logging of that kind of daemons, I am working on something.

-- 
Antoine

Reply via email to