annotate remote @ 11:a9b52f657f08

finish coding 1.0 version
author carl
date Thu, 15 Dec 2005 16:20:17 -0800
parents 5dfe0138b4f9
children 0d65c3de34fd
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
d76f9ff42487 initial coding
carl
parents:
diff changeset
11 n=syslog2iptables
d76f9ff42487 initial coding
carl
parents:
diff changeset
12 v=0.1
d76f9ff42487 initial coding
carl
parents:
diff changeset
13 t='ams ns1'
10
5dfe0138b4f9 initial coding
carl
parents: 9
diff changeset
14 t='mbmg'
9
d76f9ff42487 initial coding
carl
parents:
diff changeset
15 for i in $t; do
d76f9ff42487 initial coding
carl
parents:
diff changeset
16 scp $n*gz $i:/tmp
d76f9ff42487 initial coding
carl
parents:
diff changeset
17 me $i "cd /tmp; tar xfz $n*gz"
d76f9ff42487 initial coding
carl
parents:
diff changeset
18 me $i "cd /tmp/$n-$v; ./configure"
d76f9ff42487 initial coding
carl
parents:
diff changeset
19 me $i "cd /tmp/$n-$v; make"
d76f9ff42487 initial coding
carl
parents:
diff changeset
20 me $i "cd /tmp/$n-$v; make install"
d76f9ff42487 initial coding
carl
parents:
diff changeset
21 me $i "/etc/rc.d/init.d/$n stop"
d76f9ff42487 initial coding
carl
parents:
diff changeset
22 me $i "/sbin/iptables -F INPUT"
d76f9ff42487 initial coding
carl
parents:
diff changeset
23 me $i "cd /tmp/$n-$v; make chkconfig"
10
5dfe0138b4f9 initial coding
carl
parents: 9
diff changeset
24 if [ -f remote.$i ]; then
5dfe0138b4f9 initial coding
carl
parents: 9
diff changeset
25 scp remote.$i $i:/etc/$n.conf
5dfe0138b4f9 initial coding
carl
parents: 9
diff changeset
26 fi
9
d76f9ff42487 initial coding
carl
parents:
diff changeset
27 done