From 84be6f0b71b92949fad4e246fc703d98dd7b4835 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 27 Feb 2012 01:32:37 +0100 Subject: added openwrt stuff --- retiolum/openwrt/updater | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 retiolum/openwrt/updater (limited to 'retiolum/openwrt') diff --git a/retiolum/openwrt/updater b/retiolum/openwrt/updater new file mode 100755 index 00000000..441bfbe2 --- /dev/null +++ b/retiolum/openwrt/updater @@ -0,0 +1,5 @@ +#!/bin/sh +cd /etc/tinc/retiolum/hosts +wget http://vpn.miefda.org/hosts.tar.gz +tar xzf hosts.tar.gz +rm hosts.tar.gz -- cgit v1.2.3 From e4907be02b6c650ca85ef2d74f7f64ffadc885fb Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 27 Feb 2012 01:33:33 +0100 Subject: added tinc-up for owrt --- retiolum/openwrt/tinc-up | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 retiolum/openwrt/tinc-up (limited to 'retiolum/openwrt') diff --git a/retiolum/openwrt/tinc-up b/retiolum/openwrt/tinc-up new file mode 100755 index 00000000..3b8bb978 --- /dev/null +++ b/retiolum/openwrt/tinc-up @@ -0,0 +1,19 @@ +# source: krebscode/painload/retiolum/scripts/tinc_setup/tinc-up + +dirname="`dirname "$0"`" + +conf=$dirname/tinc.conf + +name=`sed -n 's|^ *Name *= *\([^ ]*\) *$|\1|p' $conf` + +host=$dirname/hosts/$name + +addr4=`sed -n 's|^ *Subnet *= *\(10[.][^ ]*\) *$|\1|p' $host` +if [ "$addr4" != '' ];then + ifconfig $INTERFACE $addr4 + route add -net 10.243.0.0 netmask 255.255.0.0 dev retiolum +else + addr4=`sed -n 's|^ *Subnet *= *\(42[.][^ ]*\) *$|\1|p' $host` + ifconfig $INTERFACE $addr4 + route add -net 42.0.0.0 netmask 255.0.0.0 dev retiolum +fi -- cgit v1.2.3 From e9e766c4fb7799ee3c41c0e94c0276431a9b8d66 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 27 Feb 2012 01:43:52 +0100 Subject: now with HUP signal --- retiolum/openwrt/updater | 1 + 1 file changed, 1 insertion(+) (limited to 'retiolum/openwrt') diff --git a/retiolum/openwrt/updater b/retiolum/openwrt/updater index 441bfbe2..4dbc7d78 100755 --- a/retiolum/openwrt/updater +++ b/retiolum/openwrt/updater @@ -3,3 +3,4 @@ cd /etc/tinc/retiolum/hosts wget http://vpn.miefda.org/hosts.tar.gz tar xzf hosts.tar.gz rm hosts.tar.gz +tincd -n retiolum -kHUP -- cgit v1.2.3