#!/bin/bash
export SITE=$1

# Attempt to connect to the Gopher server on port 70
timeout 2 bash -c "</dev/tcp/${SITE}/70" &> /dev/null

if [ $? -ne 0 ]; then
  exit 1
else
  exit 0
fi
