watch-workers.applescript 796 B

1234567891011121314151617181920212223
  1. set workers to {"h8.opera.com", "h9.opera.com", "h10.opera.com"}
  2. tell application "iTerm"
  3. activate
  4. set myterm to (make new terminal)
  5. tell myterm
  6. set number of columns to 80
  7. set number of rows to 50
  8. repeat with workerhost in workers
  9. set worker to (make new session at the end of sessions)
  10. tell worker
  11. set name to workerhost
  12. set foreground color to "white"
  13. set background color to "black"
  14. set transparency to 0.1
  15. exec command "/bin/sh -i"
  16. write text "ssh root@" & workerhost & " 'tail -f /var/log/celeryd.log'"
  17. end tell
  18. end repeat
  19. tell the first session
  20. activate
  21. end tell
  22. end tell
  23. end tell