annotate remote @ 25:caff690d7766

don't flush input chain, use -D option instead
author carl
date Wed, 01 Feb 2006 10:42:09 -0800
parents 048cd6e642bc
children 28fec0c67646
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
d76f9ff42487 initial coding
carl
parents:
diff changeset
1 #!/bin/bash
d76f9ff42487 initial coding
carl
parents:
diff changeset
2
d76f9ff42487 initial coding
carl
parents:
diff changeset
3 function me()
d76f9ff42487 initial coding
carl
parents:
diff changeset
4 {
d76f9ff42487 initial coding
carl
parents:
diff changeset
5 a="$1"
d76f9ff42487 initial coding
carl
parents:
diff changeset
6 b="$2"
d76f9ff42487 initial coding
carl
parents:
diff changeset
7 echo "ssh $a $b"
d76f9ff42487 initial coding
carl
parents:
diff changeset
8 ssh $a "$b"
d76f9ff42487 initial coding
carl
parents:
diff changeset
9 }
d76f9ff42487 initial coding
carl
parents:
diff changeset
10
20
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
11 T=`grep AM_INIT_AUTOMAKE configure.in | cut -d'(' -f2`
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
12 NAME=`echo $T | cut -d, -f1`
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
13 VER=`echo $T | cut -d, -f2 | cut -d')' -f1`
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
14 BALL=$NAME-$VER.tar.gz
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
15 web=/home/httpd/html/510sg/$NAME
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
16 GZ=$web/packages/$BALL
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
17
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
18 t='ams ns1 mbmg'
9
d76f9ff42487 initial coding
carl
parents:
diff changeset
19 for i in $t; do
22
c6cff7a663b2 add better logging
carl
parents: 21
diff changeset
20 echo " installing on $i"
20
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
21 scp $GZ $i:/tmp
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
22 me $i "cd /tmp; tar xfz $BALL"
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
23 me $i "cd /tmp/$NAME-$VER; ./configure"
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
24 me $i "cd /tmp/$NAME-$VER; make"
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
25 me $i "cd /tmp/$NAME-$VER; make install"
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
26 me $i "/etc/rc.d/init.d/$NAME stop"
9
d76f9ff42487 initial coding
carl
parents:
diff changeset
27 me $i "/sbin/iptables -F INPUT"
20
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
28 me $i "cd /tmp/$NAME-$VER; make chkconfig"
21
2342081106d9 add better logging
carl
parents: 20
diff changeset
29 me $i "ln --symbolic --force /etc/$NAME.conf /usr/local/etc/$NAME.conf"
20
0d65c3de34fd add better logging
carl
parents: 10
diff changeset
30 me $i "/etc/rc.d/init.d/$NAME start"
22
c6cff7a663b2 add better logging
carl
parents: 21
diff changeset
31
c6cff7a663b2 add better logging
carl
parents: 21
diff changeset
32 echo " install done on $i, press enter to continue"
c6cff7a663b2 add better logging
carl
parents: 21
diff changeset
33 read a
9
d76f9ff42487 initial coding
carl
parents:
diff changeset
34 done