Hitchhiker's Guide to Openbsd


Starting up local daemons and configuration


Download 1.27 Mb.
Pdf ko'rish
bet144/258
Sana04.04.2023
Hajmi1.27 Mb.
#1328980
1   ...   140   141   142   143   144   145   146   147   ...   258
Bog'liq
obsd-faq49

Starting up local daemons and configuration
For other daemons which you might install on the system via packages or other ways, you could use the /
etc/rc.local file. For example, I've installed a daemon which lies at /usr/local/sbin/daemonx. I want it to 
start at boot time. I could put an entry into /etc/rc.local like this: 
if [ -x /usr/local/sbin/daemonx ]; then
echo -n ' daemonx'; /usr/local/sbin/daemonx
fi
(If the daemon does not automatically detach on startup, remember to add a "&" at the end of the 
command line.) 
From now on, this daemon will be started at boot. You will be able to see any errors on boot, a normal 
boot with no errors would show a line like this: 
Starting local daemons: daemonx.
The /etc/rc.d/ directory
Starting with OpenBSD 4.9, you have another option for 
packages
. Most packages will now install a 
startup script in 
/etc/rc.d
to handle their startup and shutdown. This is used ONLY for add-on applications, 
the base system does not use any scripts in this directory. 
Note that rather than having each script in rc.d managing the entire startup, shutdown, reload, restart, and 
check operations, most rc.d scripts can be reduced to specifying a very few variables, and invoking the 
rc.
subr
script, which manages most of the standard way of doing these tasks. 
http://www.openbsd.org/faq/faq10.html (4 of 32)9/4/2011 10:02:15 AM


10 - System Management
rc.shutdown
/etc/rc.shutdown is a script that is run at shutdown. Anything you want done before the system shuts down 
should be added to this file. If you have apm, you can also set "powerdown=YES", which will give you 
the equivalent of "shutdown -p". 
10.4 - Why do users get "relaying denied" when they are 

Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   140   141   142   143   144   145   146   147   ...   258




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling