From d818d26256380d1be91cb3d449271da96adb2105 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 26 Feb 2014 22:53:35 +0100 Subject: implement IRC proposal to refresh supernodes //ship/src/refresh-supers is the script which will update your tinc config and choose 5 working supernodes for you to connect to. This proposal may become part of the tinc.krebsco.de install script --- ship/src/refresh-supers | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ship/src/refresh-supers') diff --git a/ship/src/refresh-supers b/ship/src/refresh-supers index 26909a94..af31a5df 100644 --- a/ship/src/refresh-supers +++ b/ship/src/refresh-supers @@ -1,6 +1,9 @@ #!/bin/sh #@info # usage: [DEBUG=1] [tincconf=/not/tinc/retiolum/tinc.conf] $0 +# This is the implementation of the proposal how to update tinc supernode +# connections + #@include core #@include retiolum # using find_supernodes @@ -10,12 +13,14 @@ #@strict #@mainifyme +refresh_supernode_keys + max_connect_to=${max_connect_to:-5} tincconf=${tincconf:-$tinc_path/$netname/tinc.conf} tmp_tincconf=$(mktemp) defer "rm -f $tmp_tincconf" -sed '/[ ]*ConnectTo=/d' "$tincconf" > "$tmp_tincconf" +sed '/^[ ]*ConnectTo/d' "$tincconf" > "$tmp_tincconf" find_supernodes | cut -d\ -f 1 | shuf \ | head -n "${max_connect_to}" \ @@ -24,3 +29,5 @@ find_supernodes | cut -d\ -f 1 | shuf \ info "replacing old tinc.conf with one" test "${DEBUG:-}" && diff "$tincconf" "$tmp_tincconf" mv "$tmp_tincconf" "$tincconf" + +tinc_reload -- cgit v1.2.3