summaryrefslogtreecommitdiff
path: root/Push
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-05-20 23:59:10 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2006-05-20 23:59:10 +0000
commit4883e438dfaf08f6c79e0adfe0fdd3260b6d2969 (patch)
treec6dd516288f7aaad7a51fcef4f845431af2b8e5a /Push
parent435eac9fd457af9d38738a412aa81d859550d650 (diff)
Add original sa-bogofilter
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@95 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'Push')
-rwxr-xr-xPush20
1 files changed, 10 insertions, 10 deletions
diff --git a/Push b/Push
index 1820a39..b389f97 100755
--- a/Push
+++ b/Push
@@ -13,7 +13,7 @@ end
def getFilesMD5(host, ssh_hostname)
cmd = ssh_hostname ?
- "ssh root@#{ssh_hostname} /bin/ls -1 /etc/openvpn" :
+ "ssh -4 root@#{ssh_hostname} /bin/ls -1 /etc/openvpn" :
"ls -1 #{$NAMESPACE}-#{host}"
puts "| " + cmd
f = IO.popen( cmd, aModeString="r" );
@@ -23,7 +23,7 @@ def getFilesMD5(host, ssh_hostname)
md5 = {}
if (files.length > 0)
cmd = ssh_hostname ?
- "ssh root@#{ssh_hostname} 'cd /etc/openvpn && md5sum " + files.join(' ') + "'" :
+ "ssh -4 root@#{ssh_hostname} 'cd /etc/openvpn && md5sum " + files.join(' ') + "'" :
"cd #{$NAMESPACE}-#{host} && md5sum " + files.join(' ')
puts "| " + cmd
f = IO.popen( cmd, aModeString="r" );
@@ -105,7 +105,7 @@ hosts.each{ |hostname|
}
dir = "#{$NAMESPACE}-#{hostname}/"
- sys("scp "+copy.collect{|f| dir+f }.join(' ')+" root@#{ssh_hostname}:/etc/openvpn/") if copy.size > 0
+ sys("scp -4 "+copy.collect{|f| dir+f }.join(' ')+" root@#{ssh_hostname}:/etc/openvpn/") if copy.size > 0
commands = []
commands << "sh ./#{do_iptables} &&\n" if do_iptables
commands << "sh ./#{do_ip6tables} &&\n" if do_ip6tables
@@ -115,13 +115,13 @@ hosts.each{ |hostname|
command = "cd /etc/openvpn && \n";
command << commands.join('')
command << "echo 'all done'"
- sys("ssh root@#{ssh_hostname} '#{command}'") if commands.size > 0
+ sys("ssh -4 root@#{ssh_hostname} '#{command}'") if commands.size > 0
if (do_quagga)
- sys("ssh root@#{ssh_hostname} 'cp -a /etc/openvpn/#{$NAMESPACE}.quagga.bgpd /etc/quagga/bgpd.conf &&
- cp -a /etc/openvpn/#{$NAMESPACE}.quagga.zebra /etc/quagga/zebra.conf &&
- cp -a /etc/openvpn/#{$NAMESPACE}.quagga.daemons /etc/quagga/daemons &&
- chmod 640 /etc/quagga/bgpd.conf /etc/quagga/zebra.conf &&
- chgrp quagga /etc/quagga/bgpd.conf /etc/quagga/zebra.conf &&
- /etc/init.d/quagga restart'")
+ sys("ssh -4 root@#{ssh_hostname} 'cp -a /etc/openvpn/#{$NAMESPACE}.quagga.bgpd /etc/quagga/bgpd.conf &&
+ cp -a /etc/openvpn/#{$NAMESPACE}.quagga.zebra /etc/quagga/zebra.conf &&
+ cp -a /etc/openvpn/#{$NAMESPACE}.quagga.daemons /etc/quagga/daemons &&
+ chmod 640 /etc/quagga/bgpd.conf /etc/quagga/zebra.conf &&
+ chgrp quagga /etc/quagga/bgpd.conf /etc/quagga/zebra.conf &&
+ /etc/init.d/quagga restart'")
end
}