view remote @ 11:a9b52f657f08

finish coding 1.0 version
author carl
date Thu, 15 Dec 2005 16:20:17 -0800
parents 5dfe0138b4f9
children 0d65c3de34fd
line wrap: on
line source

#!/bin/bash

function me()
{
    a="$1"
    b="$2"
    echo "ssh $a $b"
    ssh $a "$b"
}

n=syslog2iptables
v=0.1
t='ams ns1'
t='mbmg'
for i in $t; do
    scp $n*gz $i:/tmp
    me $i "cd /tmp; tar xfz $n*gz"
    me $i "cd /tmp/$n-$v; ./configure"
    me $i "cd /tmp/$n-$v; make"
    me $i "cd /tmp/$n-$v; make install"
    me $i "/etc/rc.d/init.d/$n stop"
    me $i "/sbin/iptables -F INPUT"
    me $i "cd /tmp/$n-$v; make chkconfig"
    if [ -f remote.$i ]; then
        scp remote.$i $i:/etc/$n.conf
    fi
done