diff --git a/SSH-VPN-VNC/connect2jet b/SSH-VPN-VNC/connect2jet index 28cd33d89c3163a7bebd2c00513bf91647d5e35e..b599496ee0c0596fa39694cbd42beff499089139 100755 --- a/SSH-VPN-VNC/connect2jet +++ b/SSH-VPN-VNC/connect2jet @@ -12,8 +12,8 @@ help() { $0 -g [gateway] -p [port] -r [remote-port] user@remote Options: -g [gateway] gateway server, e.g. user@login.univie.ac.at - -p [port] port to forward from jet to local, egv VNC port - -r [port] remote port if not the same as port + -p [port] port to forward from jet to local, e.g. VNC port + -r [port] remote port if not the same as port Example: $0 -g [U:Account-Username]@login.univie.ac.at [Jet-Username]@jet01.img.univie.ac.at @@ -61,12 +61,12 @@ remote_status=false gateway_status=false if [ -e $HOME/.ssh/config ]; then # check if hosts are there - cat $HOME/.ssh/config | grep -i 'Host ${remote}' > /dev/null + cat $HOME/.ssh/config | grep -i 'Host ${remote}' >/dev/null if [ $? -eq 0 ]; then remote_status=true fi if [ -n ${gateway} ]; then - cat $HOME/.ssh/config | grep -i 'Host ${gateway}' > /dev/null + cat $HOME/.ssh/config | grep -i 'Host ${gateway}' >/dev/null if [ $? -eq 0 ]; then gateway_status=true fi @@ -89,11 +89,11 @@ if [ -n "${gateway}" ]; then echo "$(date) | ssh $command -t $gateway 'ssh ${command} ${remote}'" >>.${script/.sh/.log} fi else - if [ ! $remote_status ] ; then + if [ ! $remote_status ]; then echo "Could fail if not: [user]@[server]" fi echo "Direct connection to: ${remote}" ssh ${command} ${remote} echo "$(date) | ssh ${command} ${remote}" >>.${script/.sh/.log} fi -echo "Command Log in .${script/.sh/.log}" \ No newline at end of file +echo "Command Log in .${script/.sh/.log}" diff --git a/SSH-VPN-VNC/connect2vpn b/SSH-VPN-VNC/connect2vpn index c81a531fe726ff34ee91095e6efec8a4420633c3..92e02f2df7dbd278b753cab8e7ccc05fd77a6f97 100755 --- a/SSH-VPN-VNC/connect2vpn +++ b/SSH-VPN-VNC/connect2vpn @@ -19,7 +19,10 @@ if [ $? -ne 0 ]; then exit 1 fi -if [ $# -eq 0 ]; then + +read -p "[VPN] Full (1) or split (None) tunnel? (1/None)" REPLY +# echo "REPLY: $REPLY" +if [ "$REPLY" == "" ]; then echo "[VPN] Connecting split-tunnel ..." f5fpc -s -t vpn.univie.ac.at -u ${VPN_USER} else @@ -30,4 +33,5 @@ fi watch -n 10 'f5fpc --info' echo "[VPN] Shutting down ..." # Disconnect -f5fpc -o \ No newline at end of file +f5fpc -o +echo "[VPN] disconnected" \ No newline at end of file