(for example: "/etc/rc.d/myscript")
2. chmod a+x the script
3. you're done.
This will work for the recent versions of FreeBSD (you didn't say for
which version do you need it).
you need to make that script react for "start" and "stop" commands at