|
@@ -8,7 +8,7 @@
|
8
|
8
|
#
|
9
|
9
|
# Freedom in the Cloud
|
10
|
10
|
#
|
11
|
|
-# Host git repos which the project depends on
|
|
11
|
+# Mirror git repos which the project depends on
|
12
|
12
|
#
|
13
|
13
|
# License
|
14
|
14
|
# =======
|
|
@@ -119,6 +119,18 @@ function create_trove_user {
|
119
|
119
|
fi
|
120
|
120
|
}
|
121
|
121
|
|
|
122
|
+function enable_trove_via_onion {
|
|
123
|
+ if ! grep -q 'Host *.onion' /home/trove/.ssh/config; then
|
|
124
|
+ if [ ! -d /home/trove/.ssh ]; then
|
|
125
|
+ mkdir /home/trove/.ssh
|
|
126
|
+ fi
|
|
127
|
+ echo 'Host *.onion' >> /home/trove/.ssh/config
|
|
128
|
+ echo 'ProxyCommand connect -R remote -5 -S 127.0.0.1:9050 %h %p' >> /home/trove/.ssh/config
|
|
129
|
+ chown $MY_USER_NAME:trove /home/trove/.ssh
|
|
130
|
+ chown $MY_USER_NAME:trove /home/trove/.ssh/config
|
|
131
|
+ fi
|
|
132
|
+}
|
|
133
|
+
|
122
|
134
|
function update_repos_from_friend {
|
123
|
135
|
if [ ! $FRIENDS_TROVE_SERVER ]; then
|
124
|
136
|
return
|
|
@@ -215,6 +227,7 @@ shift
|
215
|
227
|
done
|
216
|
228
|
|
217
|
229
|
create_trove_user
|
|
230
|
+enable_trove_via_onion
|
218
|
231
|
update_repos_from_friend
|
219
|
232
|
sync_trove_repos
|
220
|
233
|
|