Files
BSN-Chatsystem/start-tunnel.sh
T
Hermes Agent bbefb8807b 🚀 Initial commit: BSN Chatbot — Multi-Channel Intake System
WhatsApp webhook, admin dashboard, public frontend, media handling, LLM auto-summarize, hall/stand detection, iOS-style backend
2026-06-17 13:22:19 +02:00

24 lines
686 B
Bash
Executable File

#!/bin/bash
# Start permanent Cloudflare Tunnel for BSN Chatbot
# Usage: bash start-tunnel.sh <CLOUDFLARE_TUNNEL_TOKEN>
set -e
TOKEN="$1"
if [ -z "$TOKEN" ]; then
echo "Usage: bash start-tunnel.sh <CLOUDFLARE_TUNNEL_TOKEN>"
exit 1
fi
# Save token
echo "$TOKEN" > /home/hermes/workspace/bsn-chatbot/.cloudflare_token
chmod 600 /home/hermes/workspace/bsn-chatbot/.cloudflare_token
echo "Token saved ($(wc -c < /home/hermes/workspace/bsn-chatbot/.cloudflare_token) chars)"
# Kill any existing cloudflared
pkill -9 -f cloudflared 2>/dev/null || true
sleep 1
# Start permanent tunnel
echo "Starting tunnel..."
exec /home/hermes/.local/bin/cloudflared tunnel run --token "$TOKEN"