tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rc.d: how to daemonize a non-daemonizing daemon?
I'm trying to write a sensible rc.d script for cups-browsed. Unfortunately,
cups-browsed itself does not daemonize. Now, that's not hard in shell:
( cd /; cups-browsed "$@" <&- >&- 2>&- & echo "$!" >$pidfile ) &
but how do I incorporate that into an rc.d script? There seems to be no way
to set command to a shell function executing that code. If I set my own
start_cmd, I loose all the magic foo rc.subr does for me. do I need to put
that piece of code into a shell wrapper file or is there a simpler and
more elegant way?
Home |
Main Index |
Thread Index |
Old Index