summaryrefslogtreecommitdiffstats
path: root/modules/retiolum/scripts/tinc_setup
diff options
context:
space:
mode:
authortv <tv@also>2011-05-29 15:47:21 +0200
committertv <tv@also>2011-05-29 15:47:21 +0200
commit12c77cdbfa4ec48d935af3ae7cf1118e38bec6e1 (patch)
tree2fdf8b557d2a2a1edaba2be569c2110c3822559f /modules/retiolum/scripts/tinc_setup
parentedaa1d7f7a0ed33c019fce185b8aff7563498b6e (diff)
lowered filesystem hierarchy--everything are modules
Diffstat (limited to 'modules/retiolum/scripts/tinc_setup')
-rw-r--r--modules/retiolum/scripts/tinc_setup/README18
-rw-r--r--modules/retiolum/scripts/tinc_setup/autoupdate_cron.sh7
-rw-r--r--modules/retiolum/scripts/tinc_setup/bootstrap.sh11
-rwxr-xr-xmodules/retiolum/scripts/tinc_setup/build_arch.sh14
-rwxr-xr-xmodules/retiolum/scripts/tinc_setup/build_debian.sh32
-rwxr-xr-xmodules/retiolum/scripts/tinc_setup/build_debian_clean.sh31
-rwxr-xr-xmodules/retiolum/scripts/tinc_setup/build_ec2.sh16
-rw-r--r--modules/retiolum/scripts/tinc_setup/build_no.de.sh1
-rwxr-xr-xmodules/retiolum/scripts/tinc_setup/install.sh72
-rwxr-xr-xmodules/retiolum/scripts/tinc_setup/tinc-up20
-rw-r--r--modules/retiolum/scripts/tinc_setup/write_channel.py26
11 files changed, 0 insertions, 248 deletions
diff --git a/modules/retiolum/scripts/tinc_setup/README b/modules/retiolum/scripts/tinc_setup/README
deleted file mode 100644
index 11d6f6e9..00000000
--- a/modules/retiolum/scripts/tinc_setup/README
+++ /dev/null
@@ -1,18 +0,0 @@
-This directory contains the build and install scripts for shack-retiolum
-
-1. build_arch
- arch linux build script
-2. build_debian
- debian build script
-3. build_debian_clean
- debian script which builds a clean tinc daemon
-4. build_ec2
- Amazon ec2 base instance build script
-5. install.sh
- configures the tinc daemon
- $1 is the nickname
- $2 is the ip-address
- also writes a python file inside the tinc/retiolum folder which posts
- the public key into the IRC:freenode/#tincspasm
-6. build_no.de
- nonfunct no.de smartmachine build script
diff --git a/modules/retiolum/scripts/tinc_setup/autoupdate_cron.sh b/modules/retiolum/scripts/tinc_setup/autoupdate_cron.sh
deleted file mode 100644
index d5d41aaf..00000000
--- a/modules/retiolum/scripts/tinc_setup/autoupdate_cron.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-cat <<EOF
-# Add these lines to your crontab:
-
-12 23 * * * /home/node/usr/sbin/tincd -n retiolum &>/dev/null
-12 23 * * * cd /home/node/etc/tinc/retiolum/hosts/ && /opt/local/bin/git pull && pkill -HUP tincd
-EOF
-
diff --git a/modules/retiolum/scripts/tinc_setup/bootstrap.sh b/modules/retiolum/scripts/tinc_setup/bootstrap.sh
deleted file mode 100644
index 32919e7d..00000000
--- a/modules/retiolum/scripts/tinc_setup/bootstrap.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-if [ ! `id -u` -eq "0" ]
-then
- echo "not root, trying sudo"
- exec sudo "$0" "$@"
-fi
-
-mkdir -p /etc/tinc/retiolum/
-git clone git://github.com/miefda/retiolum.git /etc/tinc/retiolum/hosts
-cd /etc/tinc/retiolum/hosts/.scripts
-
-echo "use the build script of your choice from /etc/tinc/retiolum/hosts/.scripts"
diff --git a/modules/retiolum/scripts/tinc_setup/build_arch.sh b/modules/retiolum/scripts/tinc_setup/build_arch.sh
deleted file mode 100755
index 5ef5d765..00000000
--- a/modules/retiolum/scripts/tinc_setup/build_arch.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-set -e
-sudo pacman -S openssl gcc lzo
-curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz
-cd tinc-1.0.13
-./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
-make
-sudo make install
-cd ..
-
-echo "overwriting python to python2"
-sed 's/\/usr\/bin\/python/\/usr\/bin\/python2/g' install.sh >install2.sh
-mv install2.sh install.sh
-
diff --git a/modules/retiolum/scripts/tinc_setup/build_debian.sh b/modules/retiolum/scripts/tinc_setup/build_debian.sh
deleted file mode 100755
index 52e61390..00000000
--- a/modules/retiolum/scripts/tinc_setup/build_debian.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-set -x
-if [ ! "$MYIP" ]
-then
- MYIP=10.0.7.7.55
-fi
-if [ ! "$MYHOSTNAME" ]
-then
- MYHOSTNAME="penis"
-fi
-
-if [ "$MYHOSTNAME" = "penis" ];
-then
- read -n1 -p "name is penis, are u sure? [yN]"
- if [[ "$REPLY" != [yY] ]]
- then
- echo "then better RTFC"
- echo "bailing out"
- exit 0
- fi
-fi
-apt-get install tinc git curl python
-
-./install.sh "$MYHOSTNAME" "$MYIP"
-
-# for autostart
-sed -i '/retiolum/d' /etc/tinc/nets.boot
-echo "retiolum" >> /etc/tinc/nets.boot
-sed -i '/EXTRA/d' /etc/tinc/nets.boot
-echo "EXTRA=\"\"" >> /etc/default/tinc
-
-/etc/init.d/tinc start
diff --git a/modules/retiolum/scripts/tinc_setup/build_debian_clean.sh b/modules/retiolum/scripts/tinc_setup/build_debian_clean.sh
deleted file mode 100755
index a7332f4e..00000000
--- a/modules/retiolum/scripts/tinc_setup/build_debian_clean.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-set -xe
-MYIP=10.0.7.7.55
-
-apt-get install tinc git curl gcc gcc-dev build-essential libssl-dev python
-
-git clone https://github.com/makefu/shack-retiolum.git
-
-mkdir build
-cd build
-curl http://www.oberhumer.com/opensource/lzo/download/lzo-2.04.tar.gz | tar
-xz
-cd lzo-2.04
-./configure --prefix=/usr
-make
-sudo make install
-cd ..
-curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz
-cd tinc-1.0.13
-./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
-make
-sudo make install
-cd ../..
-
-cd shack-retiolum
-./install.sh `hostname` $MYIP
-
-rm shack-retiolum
-# for autostart
-echo "retiolum" >> /etc/tinc/nets.boot
-echo "EXTRA=\"--user=tincd --chroot\"" >> /etc/default/tinc
diff --git a/modules/retiolum/scripts/tinc_setup/build_ec2.sh b/modules/retiolum/scripts/tinc_setup/build_ec2.sh
deleted file mode 100755
index 79f2af28..00000000
--- a/modules/retiolum/scripts/tinc_setup/build_ec2.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-set -e
-sudo yum install -y gcc openssl-devel
-mkdir build
-cd build
-curl http://www.oberhumer.com/opensource/lzo/download/lzo-2.04.tar.gz | tar xz
-cd lzo-2.04
-./configure --prefix=/usr
-make
-sudo make install
-cd ..
-curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz
-cd tinc-1.0.13
-./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
-make
-sudo make install
diff --git a/modules/retiolum/scripts/tinc_setup/build_no.de.sh b/modules/retiolum/scripts/tinc_setup/build_no.de.sh
deleted file mode 100644
index 2976d3a2..00000000
--- a/modules/retiolum/scripts/tinc_setup/build_no.de.sh
+++ /dev/null
@@ -1 +0,0 @@
-pkgin in lzo gcc-tools gcc-compiler gcc34
diff --git a/modules/retiolum/scripts/tinc_setup/install.sh b/modules/retiolum/scripts/tinc_setup/install.sh
deleted file mode 100755
index 9df38df7..00000000
--- a/modules/retiolum/scripts/tinc_setup/install.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#! /bin/sh
-# USE WITH GREAT CAUTION
-
-#make -C ../../ update
-set -e
-DIRNAME=`dirname $0`
-CURR=`readlink -f ${DIRNAME}`
-MYBIN=../../bin
-netname=retiolum
-# create configuration directory for $netname
-mkdir -p /etc/tinc/$netname/hosts
-cd /etc/tinc/$netname
-
-echo "added known hosts:"
-ls -1 hosts | LC_ALL=C sort
-echo "delete the nodes you do not trust!"
-
-myname="${1:-}"
-if [ ! "$myname" ]
-then
- echo "select username: "
- read myname
-fi
-if [ ! -e "hosts/$myname" ]
-then
- myipv4="${2:-}"
- mynet4=10.7.7.0
-
- if [ ! "$myipv4" ]
- then
- echo "select v4 subnet ip (1-255) :"
- read v4num
- myipv4=10.7.7.$v4num
- if [ "$v4num" -gt 0 -a "$v4num" -lt "256" ];
- then
- echo "check"
- else
- echo "you are made of stupid. bailing out"
- exit 1
- fi
- fi
- echo "Subnet = $myipv4" > hosts/$myname
-
- myipv6=`${CURR}/../../bin/fillxx 42:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx`/128
- echo "Subnet = $myipv6" >> hosts/$myname
-else
- echo "own host file already exists! will not write again!"
-fi
-
-cp $CURR/tinc-up /etc/tinc/$netname/
-
-cat>tinc.conf<<EOF
-Name = $myname
-ConnectTo = supernode
-ConnectTo = kaah
-ConnectTo = pa_sharepoint
-Device = /dev/net/tun
-EOF
-
-if [ ! -e rsa_key.priv ]
-then
- echo "creating new keys"
- tincd -n $netname -K
- python ${CURR}/write_channel.py $myname || \
- echo "cannot write public key to IRC, you are on your own. Good Luck"
-else
- echo "key files already exist, skipping"
- echo "if you know what you are doing, remove rsa_key.priv"
-fi
-# add user tincd
-# this is what the setup scripts for the distribution has to do
-#useradd tincd
diff --git a/modules/retiolum/scripts/tinc_setup/tinc-up b/modules/retiolum/scripts/tinc_setup/tinc-up
deleted file mode 100755
index 9e6148da..00000000
--- a/modules/retiolum/scripts/tinc_setup/tinc-up
+++ /dev/null
@@ -1,20 +0,0 @@
-# source: krebscode/painload/modules/retiolum/scripts/tinc_setup/tinc-up
-
-dirname="`dirname "$0"`"
-
-conf=$dirname/tinc.conf
-
-name=`sed -rn 's|^ *Name *= *([^ ]*) *$|\1|p' $conf`
-
-host=$dirname/hosts/$name
-
-route4=10.7.7.0/24
-addr4=`sed -rn 's|^ *Subnet *= *(10\.[^ ]*) *$|\1|p' $host`
-
-route6=42::/16
-addr6=`sed -rn 's|^ *Subnet *= *(42:[^ ]*) *$|\1|p' $host`
-
-ifconfig $INTERFACE up $addr4
-route add -net $route4 dev $INTERFACE
-ip -6 addr add $addr6 dev $INTERFACE
-ip -6 route add $route6 dev $INTERFACE
diff --git a/modules/retiolum/scripts/tinc_setup/write_channel.py b/modules/retiolum/scripts/tinc_setup/write_channel.py
deleted file mode 100644
index a11d4605..00000000
--- a/modules/retiolum/scripts/tinc_setup/write_channel.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/python
-import random, sys, time, socket
-try:
- myname=sys.argv[1]
-except:
- print "you are made of stupid"
- exit (23)
-
-CHANNEL = '#tincspasm'
-HOST='irc.freenode.net'
-FILE="/etc/tinc/retiolum/hosts/"+myname
-PORT=6667
-NICK= myname+"_"+str(random.randint(23,666))
-
-sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
-sock.connect((HOST,PORT))
-print NICK
-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)
-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()