I want to run a script when FreeBSD boots. I tried symlinking to it from /usr/local/etc/rc.d, but the script itself (
myscript.sh) uses paths such as
./init-site.sh. These don't resolve correctly when invoked from /usr/local/etc/rc.d.
What would a simple script look like that would start
myscript.sh and allow it's use of dot characters to correctly resolve to the script's own directory rather than /usr/local/etc/rc.d?