universe

Universe
git clone https://git.dasho.dev/universe.git
Log | Files | Refs | Submodules | README

check-tor.sh (1262B)


      1 #!/bin/bash
      2 
      3 echo "=== Tor Hidden Service Status ==="
      4 
      5 # Check if containers are running
      6 echo "Checking container status..."
      7 docker-compose ps
      8 
      9 echo ""
     10 echo "=== Hidden Service Hostnames ==="
     11 
     12 # Check hostname directly from nginx containers
     13 for container in chatterbox shitchat2 shitchat3; do
     14    echo "Checking $container..."
     15    if docker exec -t $container test -f /var/www/html/hostnames.txt 2>/dev/null; then
     16        echo "$container hostname:"
     17        docker exec -t $container cat /var/www/html/hostnames.txt 2>/dev/null || echo "  Could not read hostname file"
     18    else
     19        echo "  No hostname file found"
     20    fi
     21    
     22    # Also check Tor service status in this container
     23    echo "  Tor process status:"
     24    docker exec -t $container ps aux | grep tor | grep -v grep || echo "    Tor process not found"
     25    echo ""
     26 done
     27 
     28 echo "=== Copy hostnames to local directory ==="
     29 # Copy hostnames from containers to local files
     30 for container in chatterbox shitchat2 shitchat3; do
     31    if docker exec -t $container test -f /var/www/html/hostnames.txt 2>/dev/null; then
     32        docker exec -t $container cat /var/www/html/hostnames.txt > "${container}_hostname.txt" 2>/dev/null
     33        echo "Saved ${container} hostname to ${container}_hostname.txt"
     34    fi
     35 done