Using apache as an example:

Create the file /etc/rc.conf.d/apache

and put in it:

start_precmd="ulimit -n 1024"


This should work for anything in rc.conf.

You can also set a "global" rc.conf ulimit by putting start_precmd in /etc/rc.conf itself

Add a comment