#!/bin/bash
# Copyright 2013 Monterey Bay Aquarium Research Institute, all rights reserved.
# Continually ping target endpoint
if [ $# -ne 1 ]; then
  echo usage: $0 endpointIP
  exit 1
fi

LOGFILE=/opt/hotspot/logs/pinglog.txt
WAIT=5
TIMEOUT=10

while :
do
  date | tee -a $LOGFILE 
  ping -c 1 -t $TIMEOUT  $1 | tee -a $LOGFILE
  sleep $WAIT
done



