I found a way to make the /etc/rc.local
startup script work for starting Tailscale. Figured I’d add the solution here, just because its much less tedious than logging in and editing /usr/bin/gl_tailscale/
through the terminal.
It seems like there’s a few seconds after startup that are a bit variable where tailscale can’t start if the command is run too early.
Feel free to edit it however it works for you.
Here’s everything in the file:
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
# Method to restart Tailscale. Sometimes would be running, but non-functional.
start_tailscale()
{
tailscale status &> /tmp/tailscale.before
tailscale down
tailscale up --advertise-exit-node --accept-routes --advertise-routes=xxx.xxx.xxx.0/22 &> /tmp/tailscale.info
sleep 3 ; tailscale status &> /tmp/tailscale.after
}
. /lib/functions/gl_util.sh
remount_ubifs
# Wait for 30 seconds after startup, then run the Tailscale start method
sleep 30 ; start_tailscale &
exit 0