-
Notifications
You must be signed in to change notification settings - Fork 2
/
deploy
executable file
·139 lines (130 loc) · 3.18 KB
/
deploy
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!/bin/sh
set -e # fail if we can't source the file
. ./network-secrets.env
set -x
case $1 in
w16gw)
envsubst \ '
$dh2048_pem \
$henet_w16_password \
$henet_w16_tunnelid \
$henet_w16_username \
$w16gw_ddns4_domain \
$w16gw_ddns4_password \
$w16gw_ddns4_username \
$w16gw_ddns6_domain \
$w16gw_ddns6_password \
$w16gw_ddns6_username \
$wg_f17gw_public_key \
$wg_w16gw_private_key \
$wg_w16gw_public_key \
' < w16gw.settings | ssh root@10.7.10.1
;;
f17gw)
envsubst \ '
$dh2048_pem \
$f17gw_ddns4_domain \
$f17gw_ddns4_password \
$f17gw_ddns4_username \
$f17gw_ddns6_domain \
$f17gw_ddns6_password \
$f17gw_ddns6_username \
$freifunk_ca_crt \
$freifunk_client_crt \
$freifunk_client_key \
$henet_f17_password \
$henet_f17_tunnelid \
$henet_f17_username \
$lan_wifikey \
$cloudflared_token \
$wg_f17gw_private_key \
$wg_f17gw_private_key \
$wg_f17gw_public_key \
$wg_f17gw_public_key \
$wg_furrow_private_key \
$wg_furrow_private_key \
$wg_furrow_public_key \
$wg_furrow_public_key \
$wg_simonphone_private_key \
$wg_simonphone_private_key \
$wg_simonphone_public_key \
$wg_simonphone_public_key \
$wg_tablet_private_key \
$wg_tablet_public_key \
$wg_vpn_private_key \
$wg_vpn_public_key \
$wg_windows_private_key \
$wg_windows_public_key \
$wg_w16gw_public_key \
' < f17gw.settings | ssh root@10.7.11.1
;;
switch02)
envsubst \ '
$dh2048_pem \
$f17gw_ddns4_domain \
$f17gw_ddns4_password \
$f17gw_ddns4_username \
$f17gw_ddns6_domain \
$f17gw_ddns6_password \
$f17gw_ddns6_username \
$freifunk_ca_crt \
$freifunk_client_crt \
$freifunk_client_key \
$henet_f17_password \
$henet_f17_tunnelid \
$henet_f17_username \
$lan_wifikey \
$wg_f17gw_private_key \
$wg_f17gw_private_key \
$wg_f17gw_public_key \
$wg_f17gw_public_key \
$wg_furrow_private_key \
$wg_furrow_private_key \
$wg_furrow_public_key \
$wg_furrow_public_key \
$wg_simonphone_private_key \
$wg_simonphone_private_key \
$wg_simonphone_public_key \
$wg_simonphone_public_key \
$wg_tablet_private_key \
$wg_tablet_public_key \
$wg_vpn_private_key \
$wg_vpn_public_key \
$wg_windows_private_key \
$wg_windows_public_key \
$wg_w16gw_public_key \
' < switch02.settings | ssh root@switch02
;;
repeater-lounge|repeater-bedroom1)
envsubst \ '
$lan_wifikey \
$iot_wifikey \
$dual2_roaming_key \
$freifunk_roaming_key \
' < nanostationm2.settings | ssh root@$1
;;
travelrouter)
envsubst \ '
$lan_wifikey \
$root_shadow \
' < travelrouter.settings | ssh root@192.168.1.1
;;
first-time)
envsubst \ '
$lan_wifikey \
$iot_wifikey \
$dual2_roaming_key \
$freifunk_roaming_key \
' < nanostationm2.settings | ssh root@192.168.1.1
;;
repeater08)
envsubst \ '
$lan_wifikey \
$dual2_roaming_key \
$freifunk_roaming_key \
' < mr33.settings | ssh root@10.7.11.111
;;
*)
echo "useage: $0 <repeater0X|edgerouterx|first-time>"
;;
esac