#!/bin/csh -f

set whoami = $0
set whoami = $whoami:t

if ($#argv != 1) then
   echo "Usage: $whoami host
   echo "Try uucp poll and keep retrying on failure."
   exit 1
endif

set uucp_host = $1

while (! $?done)
  
  cp /dev/null /usr/spool/uucp/.Status/$uucp_host
  /usr/lib/uucp/uucico -s$uucp_host -r1
  if ($status == 0) then
     set done
  else
     sleep 120
  endif
end

exit 0
