xentaur
view files/node-terminal-session @ 66:aaf034af3a35
Merge of Xgurulla into Xentaur code. Not completed yet!!!
Now Xentaur can work with Amazon EC2,
but only with. Local domains management
is switched off temporarily.
Now Xentaur can work with Amazon EC2,
but only with. Local domains management
is switched off temporarily.
| author | Igor Chubin <igor@chub.in> | 
|---|---|
| date | Sat Jan 09 20:20:08 2010 +0200 (2010-01-09) | 
| 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
