Re: Where to put my own startup script (/etc/rc.local ?)

From: Kevin Oberman <oberman_at_es.net>
Date: Tue, 25 May 2004 14:08:12 -0700
You can put them in /usr/local/etc/rc.d or /etc/rc.d. The former is the
more acceptable and should be used if the startup can be run at the end
of the startup. The latter is not ideal, but it allows the script to be
run (see rcorder(8)) at most any point in the startup when adequate
resources are available. I would urge you to go with
/usr/local/etc/rc.d. 

The script must be executable, have a name ending in .sh, and support
(even if the support is to ignore) at least the 'start' and 'stop'
commands. Most scripts seem to support "restart", but I don't recall if
it's mandatory.

Take a look at files in those directories for examples of how to set up
the files. Ports that have startup scripts include net/rsync,
sysutils/LPRng and sysutils/portupgrade.
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman_at_es.net			Phone: +1 510 486-8634
Received on Tue May 25 2004 - 12:08:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:55 UTC