xentaur
view files/node-terminal-session @ 67:6c145935ece5
Fixed path scripts and configuration templates moved to a single file.
author | Igor Chubin <igor@chub.in> |
---|---|
date | Mon Jan 11 13:01:35 2010 +0200 (2010-01-11) |
parents | |
children |
line source
1 EC2_INSTANCE=$1
2 EC2_NODE=$2
3 SHORT_NAME=$3
4 NETWORK_NAME=$4
5 SESSION_NAME=$5
7 NODE_PING_OK=WAIT
8 NODE_SSH_OK=WAIT
9 NODE_STATUS=UNKNOWN
11 show_logo()
12 {
13 cat <<'EOF'
14 ___
15 / \
16 |
17 --- ---- | \ / .---- | | | .---. | |
18 / \ | / \ / | | | | |/ | |
19 |------- | / >< | | | | | | |
20 | | / / \ | | | | | | |
21 \_____ \____ _______ O / \ \____| \____| O | \____|
22 |
23 |
24 ----'
26 EOF
27 }
29 show_status()
30 {
31 cat <<EOF
33 EC2-instance: $EC2_INSTANCE
34 EC2-node name: $EC2_NODE
35 Shortname: $SHORT_NAME
36 Network name: $NETWORK_NAME
37 Network map: http://ec2.xgu.ru/network/$NETWORK_NAME
39 Node connection status
40 ----------------------
41 ping: $NODE_PING_OK
42 ssh: $NODE_SSH_OK
43 Node status: $NODE_STATUS
44 EOF
45 }
48 clear
49 show_logo
50 show_status
51 while true
52 do
53 ssh -t $SHORT_NAME screen -r ${SESSION_NAME}-
54 clear
55 show_logo
56 show_status
57 sleep 5
58 done