trove user can handle onion addresses

This commit is contained in:
Bob Mottram 2016-01-27 10:39:33 +00:00
parent e1e9e5b4da
commit a72e62a519
1 changed files with 14 additions and 1 deletions

View File

@ -8,7 +8,7 @@
# #
# Freedom in the Cloud # Freedom in the Cloud
# #
# Host git repos which the project depends on # Mirror git repos which the project depends on
# #
# License # License
# ======= # =======
@ -119,6 +119,18 @@ function create_trove_user {
fi fi
} }
function enable_trove_via_onion {
if ! grep -q 'Host *.onion' /home/trove/.ssh/config; then
if [ ! -d /home/trove/.ssh ]; then
mkdir /home/trove/.ssh
fi
echo 'Host *.onion' >> /home/trove/.ssh/config
echo 'ProxyCommand connect -R remote -5 -S 127.0.0.1:9050 %h %p' >> /home/trove/.ssh/config
chown $MY_USER_NAME:trove /home/trove/.ssh
chown $MY_USER_NAME:trove /home/trove/.ssh/config
fi
}
function update_repos_from_friend { function update_repos_from_friend {
if [ ! $FRIENDS_TROVE_SERVER ]; then if [ ! $FRIENDS_TROVE_SERVER ]; then
return return
@ -215,6 +227,7 @@ shift
done done
create_trove_user create_trove_user
enable_trove_via_onion
update_repos_from_friend update_repos_from_friend
sync_trove_repos sync_trove_repos