Starting third-party daemons on OpenBSD


Since OpenBSD 4.9, third-party daemons, like MySQL, come with a rc.d script to start, stop and manage the daemon.

Once the package is installed, the managing script is available in /etc/rc.d/.
To start a daemon, just run:

# /etc/rc.d/mysqld start

Now, if you want the daemon to automagically start on boot:

# ls -alh /etc/rc.d/mysqld
-r-xr-xr-x  1 root  bin   461B Feb 23 22:16 /etc/rc.d/mysqld
# vi /etc/rc.conf.local

Quite simple!