summaryrefslogtreecommitdiff
path: root/files/common/sbin/p2ptbl-recv
diff options
context:
space:
mode:
authorKatze Miau <miaukatzemiau@priveasy.de>2011-12-03 12:18:42 (GMT)
committerKatze Miau <miaukatzemiau@priveasy.de>2011-12-03 12:18:42 (GMT)
commite651f612faaab8db756269e65a439e1d63601793 (patch)
tree4325682b0abadccd8f19bbd363143bef60dd0998 /files/common/sbin/p2ptbl-recv
parent522bfb1a8e9bbe1238dc2fe7991ff42de38b1697 (diff)
p2ptbl: add gossip protocol
- add `p2ptbl gossip` to distribute tables via udp bcast - add interface option to `p2ptbl update` for immediate communication of updates - add p2ptbl-recv as HBBP-handler to receive table updates p2ptbl-recv has to be symlinked from <HBBP-root>/p2ptbl/<table-name>. It reads the table name from $0 and assumes that all tables are stored in /tmp/p2ptbl/.
Diffstat (limited to 'files/common/sbin/p2ptbl-recv')
-rwxr-xr-xfiles/common/sbin/p2ptbl-recv12
1 files changed, 12 insertions, 0 deletions
diff --git a/files/common/sbin/p2ptbl-recv b/files/common/sbin/p2ptbl-recv
new file mode 100755
index 0000000..f10fa39
--- /dev/null
+++ b/files/common/sbin/p2ptbl-recv
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+tbldir=/tmp/p2ptbl
+tbl=$tbldir/$(basename $0)
+
+[ -f $tbl ] || p2ptbl init $tbl
+
+gunzip > $tbl.recv
+p2ptbl merge $tbl $tbl.recv
+rm $tbl.recv \ No newline at end of file
contact: Jan Huwald // Impressum