xentaur
annotate 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 |
rev | line source |
---|---|
igor@66 | 1 EC2_INSTANCE=$1 |
igor@66 | 2 EC2_NODE=$2 |
igor@66 | 3 SHORT_NAME=$3 |
igor@66 | 4 NETWORK_NAME=$4 |
igor@66 | 5 SESSION_NAME=$5 |
igor@66 | 6 |
igor@66 | 7 NODE_PING_OK=WAIT |
igor@66 | 8 NODE_SSH_OK=WAIT |
igor@66 | 9 NODE_STATUS=UNKNOWN |
igor@66 | 10 |
igor@66 | 11 show_logo() |
igor@66 | 12 { |
igor@66 | 13 cat <<'EOF' |
igor@66 | 14 ___ |
igor@66 | 15 / \ |
igor@66 | 16 | |
igor@66 | 17 --- ---- | \ / .---- | | | .---. | | |
igor@66 | 18 / \ | / \ / | | | | |/ | | |
igor@66 | 19 |------- | / >< | | | | | | | |
igor@66 | 20 | | / / \ | | | | | | | |
igor@66 | 21 \_____ \____ _______ O / \ \____| \____| O | \____| |
igor@66 | 22 | |
igor@66 | 23 | |
igor@66 | 24 ----' |
igor@66 | 25 |
igor@66 | 26 EOF |
igor@66 | 27 } |
igor@66 | 28 |
igor@66 | 29 show_status() |
igor@66 | 30 { |
igor@66 | 31 cat <<EOF |
igor@66 | 32 |
igor@66 | 33 EC2-instance: $EC2_INSTANCE |
igor@66 | 34 EC2-node name: $EC2_NODE |
igor@66 | 35 Shortname: $SHORT_NAME |
igor@66 | 36 Network name: $NETWORK_NAME |
igor@66 | 37 Network map: http://ec2.xgu.ru/network/$NETWORK_NAME |
igor@66 | 38 |
igor@66 | 39 Node connection status |
igor@66 | 40 ---------------------- |
igor@66 | 41 ping: $NODE_PING_OK |
igor@66 | 42 ssh: $NODE_SSH_OK |
igor@66 | 43 Node status: $NODE_STATUS |
igor@66 | 44 EOF |
igor@66 | 45 } |
igor@66 | 46 |
igor@66 | 47 |
igor@66 | 48 clear |
igor@66 | 49 show_logo |
igor@66 | 50 show_status |
igor@66 | 51 while true |
igor@66 | 52 do |
igor@66 | 53 ssh -t $SHORT_NAME screen -r ${SESSION_NAME}- |
igor@66 | 54 clear |
igor@66 | 55 show_logo |
igor@66 | 56 show_status |
igor@66 | 57 sleep 5 |
igor@66 | 58 done |