9
|
1 #!/bin/bash
|
|
2
|
|
3 function me()
|
|
4 {
|
|
5 a="$1"
|
|
6 b="$2"
|
|
7 echo "ssh $a $b"
|
|
8 ssh $a "$b"
|
|
9 }
|
|
10
|
|
11 n=syslog2iptables
|
|
12 v=0.1
|
|
13 t='ams ns1'
|
10
|
14 t='mbmg'
|
9
|
15 for i in $t; do
|
|
16 scp $n*gz $i:/tmp
|
|
17 me $i "cd /tmp; tar xfz $n*gz"
|
|
18 me $i "cd /tmp/$n-$v; ./configure"
|
|
19 me $i "cd /tmp/$n-$v; make"
|
|
20 me $i "cd /tmp/$n-$v; make install"
|
|
21 me $i "/etc/rc.d/init.d/$n stop"
|
|
22 me $i "/sbin/iptables -F INPUT"
|
|
23 me $i "cd /tmp/$n-$v; make chkconfig"
|
10
|
24 if [ -f remote.$i ]; then
|
|
25 scp remote.$i $i:/etc/$n.conf
|
|
26 fi
|
9
|
27 done
|