<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/bin/csh -f
setenv NCS_SHUTUP
source ~panorama/panorama/config/setup
unsetenv NCS_SETUP

umask 002

set RAME = "82.71.13.178"
set user = rame

set datestamp = `date --utc`

set test = `ssh -i ~/.ssh/observatory_rame -o ConnectTimeout=10 -l $user $RAME ls`
set alive = $status

if ($alive != 0 ) then 
   echo "Rame Head not reachable" $datestamp &gt; /tmp/ancillary_data.txt
   #echo "Rame Head not reachable" | mail -s "Rame Head" tjsm@pml.ac.uk, petwa@pml.ac.uk
   exit(-1)
else
   echo "Rame Head Alive" $datestamp &gt; /tmp/ancillary_data.txt
   # remove files older than 7 days old
   set oldAIS = `find /users/rsg/observatory/buoy/pml/AIS/output -name \*.a\?\? -ctime +7`
   if ($#oldAIS != 0) then 
      /bin/rm $oldAIS
   endif
   # now do the rsync of the AIS information
   rsync -av ${user}@${RAME}:/root/ramehead/AIS/output/\*.ais /users/rsg/observatory/buoy/pml/AIS/output 
endif

</pre></body></html>