| RC.D(8) | System Manager's Manual | RC.D(8) |
rc.d — daemon
control scripts
/etc/rc.d/daemon |
[-d | -q]
[-f] action |
The /etc/rc.d directory contains ksh(1) scripts to start, stop, and reconfigure daemon programs (“services”).
Services installed from packages(7) may be started at boot time in the order specified by the pkg_scripts variable from rc.conf(8); the order will be reversed during shutdown. Services comprising OpenBSD base are started by rc(8).
The options are as follows:
-d-fstart action. It will
forcibly start the daemon whatever value
daemon_flags is set to. If
daemon_flags is set to “NO”, execution
will continue with the script's own defaults unless other flags are
specified.-qEach such script responds to the following actions:
Daemon control scripts use a fixed number of ksh(1) variables when starting a daemon. The following can be overridden by site-specific values provided in rc.conf.local(8):
start,
stop and reload actions to
return. This is only guaranteed with the default
rc_start, rc_stop and
rc_reload functions.To obtain the actual variable names, replace daemon with the name of the script. For example, postgres is managed through /etc/rc.d/postgresql:
daemon_flags=-D /var/postgresql/data
-w -l /var/postgresql/logfileTo override this and increase the debug log level (keeping the existing flags), define the following in rc.conf.local(8):
postgresql_flags=-D
/var/postgresql/data -w -l /var/postgresql/logfile -d 5Each script may define its own defaults, as explained in rc.subr(8).
daemon_class is a special read-only
variable. It is set to “daemon” unless there is a login class
configured in login.conf(5) with the same name as the
rc.d script itself, in which case it will be set to
that login class. This allows setting many initial process properties, for
example environment variables, scheduling priority, and process limits such
as maximum memory use and number of files.
rc.d scripts.The /etc/rc.d directory first appeared in OpenBSD 4.9.
| August 15, 2025 | Debian |