-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstripe-vpn
executable file
·51 lines (50 loc) · 1.24 KB
/
stripe-vpn
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
#!/bin/sh
set -eu
case "$(hostname -s)" in
coruscant)
uuid=c49376a4-98ad-400c-9600-ffd8cbd2cceb
uuid_2=69903ab8-e19f-4971-ab78-2cb6c4b306e6
uuid_matasano=ba1629a8-5b37-4aab-8400-dd9aff25cf8c
;;
endor)
uuid=98f9df9c-45d9-45ec-83aa-efdb68c468cb
uuid_1=480bd48e-cefa-4296-9292-5ec8ab561a89
uuid_2=6d41994f-06f5-4940-bf59-214379a49f7d
uuid_3=2a329eb9-0090-4d8a-925a-b28f2d75e678
;;
hoth)
uuid=c7b9af5a-ef6c-4a86-98ee-3370c557e054
uuid_2=8ff3ab02-9cc4-46c8-8f59-62efa7d23a0f
uuid_matasano=8d554140-47c1-4894-86d2-a2f9b01664dc
;;
wisp)
uuid=f4b6fe62-6737-47aa-bbb9-f763c58eb711
;;
zara)
uuid=0c70cd7b-3547-4b39-ae95-2e4b0968b033
;;
*)
echo >&2 "Unknown host: $(hostname -s)"
exit 1
;;
esac
if [ $# -gt 0 ]; then
case "$1" in
down)
set -x
exec nmcli con down uuid "$uuid"
;;
secondary)
set -x
nmcli con up uuid "$uuid_2"
;;
matasano)
set -x
nmcli con up uuid "$uuid_matasano"
;;
esac
else
set -x
nmcli con up uuid "$uuid"
exec ssh dev8
fi