A FreeBSD rc.d script for OPNsense that runs tailscale set after tailscaled has started. Polls until the Tailscale daemon is ready (up to 30 seconds) before applying configuration, ensuring the command doesn't fail due to a race condition on boot.
- Create a new file
/usr/local/etc/rc.d/tailscaled_set
#!/bin/sh
# PROVIDE: tailscaled_set
# REQUIRE: tailscaled
. /etc/rc.subr