From 548e5e53d3bcfec31c1fb89d61da3405aec50924 Mon Sep 17 00:00:00 2001 From: krebs Date: Wed, 4 May 2011 11:41:00 -1100 Subject: update retiolum build scripts for debian/legacy build_debian.sh: update to work with legacy (version 5) debian install.sh: fixed python script code, removed "with" statement --- modules/retiolum/build_debian.sh | 13 ++++--------- modules/retiolum/install.sh | 8 ++++---- 2 files changed, 8 insertions(+), 13 deletions(-) (limited to 'modules/retiolum') diff --git a/modules/retiolum/build_debian.sh b/modules/retiolum/build_debian.sh index ecec41a3..cb346b5f 100755 --- a/modules/retiolum/build_debian.sh +++ b/modules/retiolum/build_debian.sh @@ -1,16 +1,11 @@ #!/bin/bash -set -x -MYIP=10.0.7.7.55 +set -xe +MYIP=10.7.7.66 -aptitude install tinc git - - -git clone https://github.com/makefu/shack-retiolum.git - -cd shack-retiolum +apt-get install -y install tinc git curl python git-core ./install.sh `hostname` $MYIP # for autostart echo "retiolum" >> /etc/tinc/nets.boot -echo "EXTRA=\"--user=tincd --chroot\"" >> /etc/default/tinc +echo "EXTRA=\"\"" >> /etc/default/tinc diff --git a/modules/retiolum/install.sh b/modules/retiolum/install.sh index 5fa1d4a5..7942b703 100755 --- a/modules/retiolum/install.sh +++ b/modules/retiolum/install.sh @@ -47,7 +47,7 @@ CHANNEL = '#tincspasm' HOST='irc.freenode.net' FILE="/etc/tinc/retiolum/hosts/$myname" PORT=6667 -NICK= "$myname"+str(random.randint(23,666)) +NICK= "$myname_"+str(random.randint(23,666)) sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM) sock.connect((HOST,PORT)) @@ -56,9 +56,9 @@ sock.send("NICK %s\r\n" % NICK) sock.send("USER %s %s bla : %s\r\n" %(NICK,HOST,NICK)) sock.send("JOIN %s\r\n" % CHANNEL) time.sleep(23) -with open(FILE,'r') as f: - a = [ sock.send("PRIVMSG %s : %s" % ( CHANNEL,line)) for line in f] - time.sleep(5) #because irc is so lazy +f = open(FILE,'r') +a = [ sock.send("PRIVMSG %s : %s" % ( CHANNEL,line)) for line in f] +time.sleep(5) #because irc is so lazy print "closing socket" sock.close() EOF -- cgit v1.2.3