Option to enable monkeysphere on the client

This commit is contained in:
Bob Mottram 2016-05-02 11:20:11 +01:00
parent 5d2a8c3206
commit c4b2822abf
1 changed files with 15 additions and 4 deletions

View File

@ -33,6 +33,7 @@ export TEXTDOMAINDIR="/usr/share/locale"
CURR_USER=$USER CURR_USER=$USER
MESH_CLIENT_INSTALL= MESH_CLIENT_INSTALL=
ENABLE_MONKEYSPHERE=
# Version number of this script # Version number of this script
VERSION="1.01" VERSION="1.01"
@ -122,12 +123,18 @@ function configure_ssh_client {
echo 'Host *.onion' > ~/.ssh/config echo 'Host *.onion' > ~/.ssh/config
echo ' ServerAliveInterval 60' >> ~/.ssh/config echo ' ServerAliveInterval 60' >> ~/.ssh/config
echo ' ServerAliveCountMax 3' >> ~/.ssh/config echo ' ServerAliveCountMax 3' >> ~/.ssh/config
echo " ProxyCommand connect -R remote -5 -S 127.0.0.1:9050 %h %p" >> ~/.ssh/config if [[ $ENABLE_MONKEYSPHERE == $'yes' || $ENABLE_MONKEYSPHERE == $'y' ]]; then
echo " ProxyCommand sh -c 'monkeysphere ssh-proxycommand --no-connect %h %p ; connect -R remote -5 -S 127.0.0.1:9050 %h %p'" >> ~/.ssh/config
else
echo " ProxyCommand connect -R remote -5 -S 127.0.0.1:9050 %h %p" >> ~/.ssh/config
fi
echo "# ProxyCommand sh -c 'monkeysphere ssh-proxycommand --no-connect %h %p ; connect -R remote -5 -S 127.0.0.1:9050 %h %p'" >> ~/.ssh/config echo "# ProxyCommand sh -c 'monkeysphere ssh-proxycommand --no-connect %h %p ; connect -R remote -5 -S 127.0.0.1:9050 %h %p'" >> ~/.ssh/config
echo 'Host *' >> ~/.ssh/config echo 'Host *' >> ~/.ssh/config
echo ' ServerAliveInterval 60' >> ~/.ssh/config echo ' ServerAliveInterval 60' >> ~/.ssh/config
echo ' ServerAliveCountMax 3' >> ~/.ssh/config echo ' ServerAliveCountMax 3' >> ~/.ssh/config
echo '# ProxyCommand monkeysphere ssh-proxycommand %h %p' >> ~/.ssh/config if [[ $ENABLE_MONKEYSPHERE == $'yes' || $ENABLE_MONKEYSPHERE == $'y' ]]; then
echo ' ProxyCommand monkeysphere ssh-proxycommand %h %p' >> ~/.ssh/config
fi
echo '' echo ''
echo $'Copy the following into a file called /home/username/.ssh/authorized_keys on the Freedombone server' echo $'Copy the following into a file called /home/username/.ssh/authorized_keys on the Freedombone server'
@ -143,7 +150,7 @@ function configure_monkeysphere {
function show_help { function show_help {
echo '' echo ''
echo $"${PROJECT_NAME}-client --mesh [yes|no]" echo $"${PROJECT_NAME}-client --mesh [yes|no] --monkeysphere [yes|no]"
echo '' echo ''
exit 0 exit 0
} }
@ -164,10 +171,14 @@ do
shift shift
WIFI_CHANNEL=${1} WIFI_CHANNEL=${1}
;; ;;
--mesh) -m|--mesh)
shift shift
MESH_CLIENT_INSTALL=${1} MESH_CLIENT_INSTALL=${1}
;; ;;
--monkeysphere|--ms|--monkey)
shift
ENABLE_MONKEYSPHERE=${1}
;;
*) *)
# unknown option # unknown option
;; ;;