We said earlier that rc.subr(8) could provide default
methods. Obviously, such defaults cannot be too general.
They are suited for the common case of starting and shutting
down a simple daemon program. Let us assume now that we need
to write an rc.d
script for such a daemon
called mumbled
. Here it is:
Pleasingly simple, isn't it? Let us examine our little script. The only new thing to note is as follows:
The The daemon will be started by running
Note:Some programs are in fact executable scripts. The
system runs such a script by starting its interpreter
and passing the name of the script to it as a command-line
argument. This is reflected in the list of processes,
which can confuse rc.subr(8). You should additionally
set For each Of course, sh(1) will permit you to set
For more detailed information on default methods, refer to rc.subr(8). |
This, and other documents, can be downloaded from http://ftp.FreeBSD.org/pub/FreeBSD/doc/
For questions about FreeBSD, read the
documentation before
contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.