SessionZeroWasm/run-remote.sh
2025-07-01 23:50:40 -05:00

50 lines
1.1 KiB
Bash

#!/bin/bash
# This script helps test domain connectivity for SessionZero
echo "=== SessionZero Domain Connectivity Test ==="
echo ""
# Check if docker is running
if ! docker info > /dev/null 2>&1; then
echo "Error: Docker is not running or not installed."
exit 1
fi
# Check if the container is running
if ! docker ps | grep -q sessionzero; then
echo "Warning: SessionZero container is not running."
echo "Starting container..."
docker-compose up -d
fi
# Get the domain from user input
read -p "Enter your domain (without http/https): " DOMAIN
echo ""
echo "Testing connectivity to $DOMAIN..."
# Test basic HTTP connectivity
echo "HTTP connectivity test:"
curl -v http://$DOMAIN/ -o /dev/null 2>&1 | grep -E 'Connected|< HTTP'
# Check DNS resolution
echo ""
echo "DNS resolution test:"
host $DOMAIN
# Check if port 80 is open
echo ""
echo "Port 80 test:"
nc -zv $DOMAIN 80 2>&1
# Get server's public IP
echo ""
echo "Your server's public IP:"
curl -s ifconfig.me
echo ""
echo "=== Test Complete ==="
echo "If all tests passed but the site still doesn't work, check your Nginx logs:"
echo "docker logs sessionzero-app"