I have a Mac network with several machines that are all being backed
up, from a server, by Retrospect. The automatic backup runs
Retrospect scripts for each machine. Most of the time some of these
machines are out of the office (laptops) and of course, Retrospect
cant find them. In this case Retrospect issues a warning.
I would like to check for the presence of these machines, maybe a
ping. The result would allow me to script Retrospect accordingly.
In other words, is a particular machine is not on the network, I
would not try to back it up.
Does anyone have any ideas on this issue?
set hostName to "magrathea"
set retValue to (do shell script ("ping -c1 " & hostName & " >
/dev/null; echo $?"))
if retValue is equal to "0" then
display dialog ":-))"
else
display dialog ":-(("
end if