Setting tailscale up to be persistent through reboot on a static binary OS

I have got tailscale to work on a embedded system utilising an ARM processor but it natively doesn’t come back after a power cycle.
I have been working toward using Crontab to call a python script that checks if tailscale is up and if not starts it up, it would be called @reboot and 10 minute intervals (just to be sure).
Below is pretty much what I have got:

reply=$(/opt/tailscale_1.14.6_arm/tailscale status)
Nomatch=$'failed to connect to the local tailscaled; it doesn\'t appear to be running (sudo systemctl start tailscaled ?)\n'
if [  "$Nomatch" = "$reply" ]
/opt/tailscale_1.14.6_arm/tailscaled --state=tailscaled.state
/opt/tailscale_1.14.6_arm/tailscale up

The issue I am having is that the text for Replay doesn’t match the response from tailscale when the are visually compared using echo they are identical which makes me think the issue is that there is a escape character that I’m not seeing in the compare.
Is there a better way to do this, given that my distro is very limiting in what functionality i have no Sudo-get, networkd, systemctl and am trying not modify it to much from stock as this will create rework when the OEM releases a firmware update.

Thanks any direction would be appreciated as linux/python is not my strong point (clearly :smile: )

So I have done a bit more research and have resolved this so thought I would share: I added a python script to /etc/network/if-up.d/ as per below (need to run chmod +x ‘filename’ on if after writing it using vi or some other editor:

#Exit if network device "tailscale0" exists
ip link show dev tailscale0 >/dev/null 2>&1 exit 0
#Exit if we are not starting "eth0"
[ "$IFACE"='eth0' ] || exit 0
/opt/tailscale_1.14.0_arm/tailscaled --state=tailscaled.state &
#Provided time for tailscale to startup before attempting to authenticate
sleep 5
/opt/tailscle_1.14.0_arm/tailscale up -authkey tskey-XXXXXXXXXXXXX

I am also going to follow the following post to place the auth key in an encrypted folder

Storing Authkey

Anyway, happy to hear any feedback/improvements, hopefully it makes someones elses life easier