The major source of working, real-life examples is
<filename>/etc/rc.d
</filename> in a live system. Its contents are easy and pleasant to read because most rough corners are hidden deep in
<citerefentry><refentrytitle>rc.subr
</refentrytitle><manvolnum>8
</manvolnum></citerefentry>. Keep in mind though that the
<filename>/etc/rc.d
</filename> scripts were not written by angels, so they might suffer from bugs and suboptimal design decisions. Now you can improve them!