checkup.sh
author stephen
Mon, 13 Feb 2017 11:07:41 +0000
changeset 22 b2ba74aa0bd2
permissions -rwxr-xr-x
feb13 up
     1 #!/bin/bash
     2 
     3 # set -x
     4 
     5 res=`ssh basil.dsg.cs.tcd.ie ping -c 1 tunloradtn | grep '1 received'`
     6 
     7 if [ "$res" == "" ]
     8 then
     9 	echo "down"
    10 else
    11 	echo "up"
    12 fi