#!/usr/bin/env bash
# expose the static site on the public internet via Tailscale Funnel (valid auto-TLS)
pkill -f "tailscale funnel" 2>/dev/null
sleep 1
setsid nohup tailscale funnel 127.0.0.1:4081 >"$HOME/postiz/site/funnel.log" 2>&1 &
sleep 5
echo "=== status:"
tailscale funnel status 2>&1
echo "=== log:"
tail -5 "$HOME/postiz/site/funnel.log" 2>/dev/null
