/[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

Contents of /trunk/bin/cloud.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 73 - (show annotations)
Fri Sep 25 18:51:42 2009 UTC (14 years, 7 months ago) by dpavlin
File MIME type: application/x-sh
File size: 1429 byte(s)
fix verbosity and enlarge t61p cloud
1 #!/bin/sh
2
3 port=4000
4 offset=0
5 limit=25000
6 connect=
7
8 v=
9
10 #v='-v'
11 v='-C'
12
13 hostname=`hostname -s`
14
15 update=$1
16
17 prefix=`pwd | sed 's!/*/srv/Sack.*$!!'`
18
19 function node {
20
21 if [ ! -z "$update" ] ; then
22 echo "# update $1:$2 from $prefix"
23 rsync -rav --exclude 'out/*' $prefix/srv/Sack/ $1:/$2/srv/Sack/
24 rsync -rav --exclude 'out/*' --exclude 'var/*' $prefix/srv/webpac2/ $1:/$2/srv/webpac2/
25 ssh $1 $2/srv/Sack/bin/install-debian.sh || exit
26 ssh $1 killall sack.pl
27 fi
28
29 ssh="ssh $v -L $port:127.0.0.1:$port $1"
30 test "$hostname" == $1 && ssh=""
31
32 echo "# node $1 [$ssh] $offset $limit"
33
34 echo 0 exit | nc localhost $port
35
36 full="$ssh $2/srv/Sack/bin/sack.pl --listen $port --limit $limit --offset $offset"
37 if [ ! -z "$DISPLAY" ] ; then
38 xterm -T "$1 $port" -e $full &
39 else
40 $full &
41 fi
42 connect="$connect --connect $port"
43
44 port=`expr $port + 1`
45 offset=`expr $offset + $limit`
46 }
47
48 rm /dev/shm/sack.*
49
50 if [ $hostname == 't61p' ] ; then
51 limit=10000
52 node tab /
53 node tab /
54 node x200 /
55 node x200 /
56 node t61p /
57 else
58 echo "# .lib";
59 node mlin /virtual/webpac2.rot13.org/export/
60 node mlin /virtual/webpac2.rot13.org/export/
61 node opr /virtual/webpac2.rot13.org/export/
62 node opr /virtual/webpac2.rot13.org/export/
63 node klin /virtual/webpac2.rot13.org/export/
64 fi
65
66
67 echo "## lorry wating..."
68 sleep 1
69 echo "## ... $connect";
70 cd $prefix/srv/Sack ; ./bin/sack.pl $connect --limit $limit --offset $offset

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26