/[Sack]/trunk/bin/cloud.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/cloud.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 73 by dpavlin, Fri Sep 25 18:51:42 2009 UTC revision 77 by dpavlin, Fri Sep 25 21:13:25 2009 UTC
# Line 8  connect= Line 8  connect=
8  v=  v=
9    
10  #v='-v'  #v='-v'
11  v='-C'  v='-C -v'
12    limit=1000
13    
14  hostname=`hostname -s`  hostname=`hostname -s`
15    
# Line 23  function node { Line 24  function node {
24                  rsync -rav --exclude 'out/*'                   $prefix/srv/Sack/    $1:/$2/srv/Sack/                  rsync -rav --exclude 'out/*'                   $prefix/srv/Sack/    $1:/$2/srv/Sack/
25                  rsync -rav --exclude 'out/*' --exclude 'var/*' $prefix/srv/webpac2/ $1:/$2/srv/webpac2/                  rsync -rav --exclude 'out/*' --exclude 'var/*' $prefix/srv/webpac2/ $1:/$2/srv/webpac2/
26                  ssh $1 $2/srv/Sack/bin/install-debian.sh || exit                  ssh $1 $2/srv/Sack/bin/install-debian.sh || exit
27                  ssh $1 killall sack.pl                  return
28          fi          fi
29    
30          ssh="ssh $v -L $port:127.0.0.1:$port $1"          ssh="ssh $v -S /tmp/sack.$1.ssh -L $port:127.0.0.1:$port $1"
31          test "$hostname" == $1 && ssh=""          test "$hostname" == $1 && ssh=""
32    
         echo "# node $1 [$ssh] $offset $limit"  
   
33          echo 0 exit | nc localhost $port          echo 0 exit | nc localhost $port
34            ssh $1 "echo 0 exit | nc 127.0.0.1 $port ; killall sack.pl"
35    
36          full="$ssh $2/srv/Sack/bin/sack.pl --listen $port --limit $limit --offset $offset"          full="$ssh $2/srv/Sack/bin/sack.pl --listen $port --limit $limit --offset $offset"
37            echo "# node $1 # $full"
38    
39          if [ ! -z "$DISPLAY" ] ; then          if [ ! -z "$DISPLAY" ] ; then
40                  xterm -T "$1 $port" -e $full &                  xterm -T "$1 $port" -e $full &
41          else          else
# Line 48  function node { Line 50  function node {
50  rm /dev/shm/sack.*  rm /dev/shm/sack.*
51    
52  if [ $hostname == 't61p' ] ; then  if [ $hostname == 't61p' ] ; then
53          limit=10000          node tab.lan  /
54          node tab  /          node tab.lan  /
55          node tab  /          node x200.lan /
56          node x200 /  #       node x200.lan /
57          node x200 /          node t61p     /
         node t61p /  
58  else  else
59          echo "# .lib";          echo "# .lib";
60          node mlin /virtual/webpac2.rot13.org/export/          node mlin /virtual/webpac2.rot13.org/export/

Legend:
Removed from v.73  
changed lines
  Added in v.77

  ViewVC Help
Powered by ViewVC 1.1.26