xentaur

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/files/node-terminal-session	Mon Jan 11 13:01:35 2010 +0200
     1.3 @@ -0,0 +1,58 @@
     1.4 +EC2_INSTANCE=$1
     1.5 +EC2_NODE=$2
     1.6 +SHORT_NAME=$3
     1.7 +NETWORK_NAME=$4
     1.8 +SESSION_NAME=$5
     1.9 +   
    1.10 +NODE_PING_OK=WAIT
    1.11 +NODE_SSH_OK=WAIT
    1.12 +NODE_STATUS=UNKNOWN
    1.13 +
    1.14 +show_logo()
    1.15 +{
    1.16 +cat <<'EOF'
    1.17 +                     ___
    1.18 +                   /     \
    1.19 +                          |
    1.20 +     ---     ----         |    \    /   .----  |     |     | .---. |     |
    1.21 +   /     \ |             /      \  /   |     | |     |     |/      |     |
    1.22 +  |------- |           /         ><    |     | |     |     |       |     |
    1.23 +  |        |         /          /  \   |     | |     |     |       |     |
    1.24 +   \_____   \____  _______  O  /    \   \____|  \____|  O  |        \____|
    1.25 +                                             |
    1.26 +                                             |
    1.27 +                                         ----'
    1.28 +
    1.29 +EOF
    1.30 +}
    1.31 +
    1.32 +show_status()
    1.33 +{
    1.34 +cat <<EOF
    1.35 +
    1.36 +   EC2-instance:  $EC2_INSTANCE
    1.37 +   EC2-node name: $EC2_NODE
    1.38 +   Shortname:     $SHORT_NAME
    1.39 +   Network name:  $NETWORK_NAME
    1.40 +   Network map:   http://ec2.xgu.ru/network/$NETWORK_NAME
    1.41 +   
    1.42 +   Node connection status
    1.43 +   ----------------------
    1.44 +   ping:          $NODE_PING_OK
    1.45 +   ssh:           $NODE_SSH_OK
    1.46 +   Node status:   $NODE_STATUS
    1.47 +EOF
    1.48 +}
    1.49 +
    1.50 +
    1.51 +clear
    1.52 +show_logo
    1.53 +show_status
    1.54 +while true
    1.55 +do
    1.56 +    ssh -t $SHORT_NAME screen -r ${SESSION_NAME}-
    1.57 +    clear
    1.58 +    show_logo
    1.59 +    show_status
    1.60 +    sleep 5
    1.61 +done