forked from PEERINGTestbed/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpeering
executable file
·52 lines (42 loc) · 809 Bytes
/
peering
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
set -eu
program=$(basename "$0")
export progdir=$(cd "$(dirname "$0")"; pwd -P)
. "$progdir/scripts/peering-config"
usage () {
cat <<-EOF
usage: $0 openvpn|bgp|bgp6|prefix
openvpn Control OpenVPN tunnels
bgp Control IPv4 BGP router (BIRD)
bgp6 Control IPv6 BGP router (BIRD6)
prefix Control prefix announcements
proxy Control proxy for containers
EOF
exit 0
}
test $# -ge 1 || usage
case $1 in
openvpn)
shift
"$progdir"/scripts/peering-openvpn "$@"
;;
bgp)
shift
"$progdir"/scripts/peering-bgp "$@"
;;
bgp6)
shift
"$progdir"/scripts/peering-bgp v6 "$@"
;;
prefix)
shift
"$progdir"/scripts/peering-prefix "$@"
;;
proxy)
shift
"$progdir"/scripts/peering-proxy "$@"
;;
*)
usage
;;
esac