فهرست منبع

applescript to launch a terminal showing the celeryd logs for a set of workers.

Ask Solem 16 سال پیش
والد
کامیت
a3b80ef8ef
1فایلهای تغییر یافته به همراه23 افزوده شده و 0 حذف شده
  1. 23 0
      contrib/mac/watch-workers.applescript

+ 23 - 0
contrib/mac/watch-workers.applescript

@@ -0,0 +1,23 @@
+set workers to {"h8", "h9", "h10"}
+tell application "iTerm"
+    activate
+    set myterm to (make new terminal)
+    tell myterm
+        set number of columns to 80
+        set number of rows to 50
+        repeat with workerhost in workers
+            set worker to (make new session at the end of sessions)
+            tell worker
+                set name to workerhost
+                set foreground color to "white"
+                set background color to "black"
+                set transparency to 0.1
+                exec command "/bin/sh -i"
+                write text "ssh root@" & workerhost & " 'tail -f /var/log/celeryd.log'"
+            end tell
+        end repeat
+        tell the first session
+            activate
+        end tell
+    end tell
+end tell