Startup Program on Boot in FreeBSD

From HostThyself

Jump to: navigation, search

How to get scripts or program to run each time a FreeBSD server is booted up or rebooted. This will ensures the program is alway running.

User startup scripts are placed in /usr/local/etc/rc.d/. If you look at /etc/defaults/rc.conf, you'll find this:

Files within this folder are run in alphabetical order. So if the files to be executed in a specific order, prefix the file with number.

[edit] Loading Kernel modules on boot

Create/Edit /boot/loader.conf.local.

Refer to /boot/default/loader.conf for configurations.

Personal tools