I finally somehow figured how to wrap a service with the daemon command in #FreeBSD.
The "service foo status" command still gives me non-sense though. It's so weird.
Oddly enough, this most common of things is still *not* covered in the FreeBSD handbook. I don't get why.
For ref:
https://docs.freebsd.org/en/books/handbook/config/#configtuning-rcd
and the practical guide
https://docs.freebsd.org/en/articles/rc-scripting/
On that note, it's dead simple with systemd.
@CyReVolt hmmm doing a quick `rg "/usr/sbin/daemon"` in /usr/local/etc/rc.d (it's mostly needed for third-party software, right?), I found a few examples that might help.
sshguard: https://github.com/freebsd/freebsd-ports/blob/f5bd39fd6448045e4311f92e6ac1dd8e47b374fa/security/sshguard/files/sshguard.in
tailscaled: https://github.com/freebsd/freebsd-ports/blob/f5bd39fd6448045e4311f92e6ac1dd8e47b374fa/security/tailscale/files/tailscaled.in
The linked files are basically what ends up in /usr/local/etc/rc.d/.
I guess you're needing to make this explicit for tracking PID file etc. right?
Dumb thing to note: `service foo status` might spew nonsense if you aren't root!
freebsd-ports/security/tailscale/files/tailscaled.in at f5bd39fd6448045e4311f92e6ac1dd8e47b374fa · freebsd/freebsd-ports
freebsd-ports/security/sshguard/files/sshguard.in at f5bd39fd6448045e4311f92e6ac1dd8e47b374fa · freebsd/freebsd-ports