#! /bin/sh ### ### Start up peers registered in tripe-ipif's table ### ### (c) 2012 Mark Wooding ### ###----- Licensing notice --------------------------------------------------- ### ### This file is part of Trivial IP Encryption (TrIPE). ### ### TrIPE is free software: you can redistribute it and/or modify it under ### the terms of the GNU General Public License as published by the Free ### Software Foundation; either version 3 of the License, or (at your ### option) any later version. ### ### TrIPE is distributed in the hope that it will be useful, but WITHOUT ### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ### FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ### for more details. ### ### You should have received a copy of the GNU General Public License ### along with TrIPE. If not, see . ###-------------------------------------------------------------------------- ### Instructions. ### ### This script will tell a tripe server to associate with all of the peers ### named in the $TRIPEDIR/ipif.tab file. See `tripe-ipif' for a description ### of the configuration file. set -e quis=${0##*/} : ${TRIPEDIR=@configdir@} ## Trundle through the table. while read name remote_ext local_int remote_int routes; do ## Ignore comments, and unknown remote-external addresses. case "$name" in "" | "#"*) continue ;; esac case "$remote_ext" in -) continue ;; esac ## Parse the address. fam=INET port=4070 case "$remote_ext" in *:*) port=${remote_ext#*:}; addr=${remote_ext%:*} ;; *) addr=$remote_ext ; esac ## Add the peer. tripectl ADD "$name" "$fam" "$addr" "$port" done <$TRIPEDIR/ipif.tab ###----- That's all, folks --------------------------------------------------