Is there something going on with the shell script that Indigo does not like? If so, are there any other approaches to ping another device?
Thanks!
- Code: Select all
set server_list to {"ap_name1", "ap_name2"}
repeat with server_address in server_list
try
set result to do shell script "ping -c 1 " & server_address & ".local"
on error errStatement number errNum
if errNum = 68 then
tell application "IndigoServer"
log "AIRPORT ERROR: " & server_address & " not responding"
set emailAddress to "xxx@xxx.xxx"
set emailBody to "Airport ERROR: " & server_address & " not responding"
set emailSubject to "INDIGO: Error in Airport"
send email to emailAddress with subject emailSubject with body emailBody
end tell
end if
end try
end repeat