comparison remote @ 20:0d65c3de34fd

add better logging
author carl
date Sun, 08 Jan 2006 12:36:57 -0800
parents 5dfe0138b4f9
children 2342081106d9
comparison
equal deleted inserted replaced
19:13b2e663b553 20:0d65c3de34fd
6 b="$2" 6 b="$2"
7 echo "ssh $a $b" 7 echo "ssh $a $b"
8 ssh $a "$b" 8 ssh $a "$b"
9 } 9 }
10 10
11 n=syslog2iptables 11 T=`grep AM_INIT_AUTOMAKE configure.in | cut -d'(' -f2`
12 v=0.1 12 NAME=`echo $T | cut -d, -f1`
13 t='ams ns1' 13 VER=`echo $T | cut -d, -f2 | cut -d')' -f1`
14 t='mbmg' 14 BALL=$NAME-$VER.tar.gz
15 web=/home/httpd/html/510sg/$NAME
16 GZ=$web/packages/$BALL
17
18 t='ams ns1 mbmg'
15 for i in $t; do 19 for i in $t; do
16 scp $n*gz $i:/tmp 20 scp $GZ $i:/tmp
17 me $i "cd /tmp; tar xfz $n*gz" 21 me $i "cd /tmp; tar xfz $BALL"
18 me $i "cd /tmp/$n-$v; ./configure" 22 me $i "cd /tmp/$NAME-$VER; ./configure"
19 me $i "cd /tmp/$n-$v; make" 23 me $i "cd /tmp/$NAME-$VER; make"
20 me $i "cd /tmp/$n-$v; make install" 24 me $i "cd /tmp/$NAME-$VER; make install"
21 me $i "/etc/rc.d/init.d/$n stop" 25 me $i "/etc/rc.d/init.d/$NAME stop"
22 me $i "/sbin/iptables -F INPUT" 26 me $i "/sbin/iptables -F INPUT"
23 me $i "cd /tmp/$n-$v; make chkconfig" 27 me $i "cd /tmp/$NAME-$VER; make chkconfig"
24 if [ -f remote.$i ]; then 28 if [ -f remote.$i ]; then
25 scp remote.$i $i:/etc/$n.conf 29 scp remote.$i $i:/etc/$NAME.conf
30 else
31 scp /etc/$NAME.conf $i:/etc/$NAME.conf
26 fi 32 fi
33 me $i "/etc/rc.d/init.d/$NAME start"
27 done 34 done