Update versions.json
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 35s

This commit is contained in:
Your Name
2025-09-06 14:17:56 +12:00
parent 20a3790834
commit 8e6b00bfee
12 changed files with 564 additions and 0 deletions

44
cloudflare-tunnel/status.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/bash
# shellcheck disable=SC1091
source "${AGENT_PATH}/common.sh"
_check_required_env_vars "CONTAINER_NAME"
echo "Cloudflare Tunnel Status"
echo "========================"
if ! _is_container_exists "$CONTAINER_NAME"; then
echo "Status: NOT INSTALLED"
echo ""
echo "The Cloudflare Tunnel container does not exist."
echo "Run 'ds install [server] cloudflare-tunnel' to set it up."
exit 1
fi
if ! _is_container_running "$CONTAINER_NAME"; then
echo "Status: STOPPED"
echo ""
echo "The Cloudflare Tunnel container exists but is not running."
echo "Run 'ds start [server] cloudflare-tunnel' to start it."
exit 1
fi
# Get container details
CONTAINER_ID=$(_get_container_id "$CONTAINER_NAME")
CONTAINER_STATUS=$(_get_container_status "$CONTAINER_NAME")
echo "Status: RUNNING"
echo "Container: $CONTAINER_NAME"
echo "ID: $CONTAINER_ID"
echo "State: $CONTAINER_STATUS"
echo ""
# Show recent logs to check connection status
echo "Recent connection status:"
echo "-------------------------"
docker logs "$CONTAINER_NAME" 2>&1 | grep -E "(Registered|Connected|failed|error)" | tail -5
echo ""
echo "Dashboard: https://one.dash.cloudflare.com/ -> Zero Trust -> Access -> Tunnels"
echo "View full logs: ds logs [server] cloudflare-tunnel"
exit 0