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
You *can*, but you don't *need* to, if in a hurry :) The script will
be executed once at startup, and it can parse the "start" argument
given to it, but it doesn't have to.
In a proper RCNG script you don't parse stop/start, you override the
stop/start functions. Parsing $1 directly is how the old-style scripts
use to work, but the base system and most ports now use the RCNG
Yes, it's somewhat dirty if you
ignore start/stop arguments (and if you ignore them you can't rely on
nice built-in features like "restart" internally executing stop, then
start) but it works.
It depends, if the script is just starting a daemon then it can
simply use the default start/stop handlers, and stop/start/restart works
without any explicit handling.