Files
Axis_Cam_Tailscale/arm_ROOT/app/Tailscale_VPN
T
Weston Blieden 396b450415 Store state in localdata
The tailscaled.state file in localdata will now persist across updates, so your camera stays connected to Tailscale without re-authentication
2025-12-17 09:31:34 +01:00

29 lines
657 B
Bash
Executable File

#!/bin/sh
echo "Starting Service"
# Define paths
APP_DIR="/usr/local/packages/Tailscale_VPN"
STATE_DIR="$APP_DIR/localdata"
# Create localdata directory if it doesn't exist
mkdir -p "$STATE_DIR"
# Set permissions
chmod 777 "$APP_DIR/lib/tailscale"
chmod 777 "$APP_DIR/lib/tailscaled"
# Start tailscaled with state stored in localdata
"$APP_DIR/lib/tailscaled" \
--state="$STATE_DIR/tailscaled.state" \
--socket="$STATE_DIR/tailscaled.sock" &
echo "Service Started"
sleep 2
echo "Scroll to Bottom for link"
# Run tailscale up with the socket in localdata
"$APP_DIR/lib/tailscale" --socket="$STATE_DIR/tailscaled.sock" up --accept-routes
wait