Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applescript "ping"



On 11/3/06, Bob Cuilla <email@hidden> wrote:
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


Thanks

Bob Cuilla
BLC Data Solutions
Orlando, Fl


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
References: 
 >applescript "ping" (From: Bob Cuilla <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.