#!/bin/sh

SSHPORT=$(cat /etc/osgi-runner/conf.d/gogo-ssh.properties | egrep '^\s*gogo\.ssh\.port\s*=' |cut -f2 -d'=' |tr -d ' ' |tr -d '\r')

if [ -z "$SSHPORT" ] ; then
  echo "FATAL: Unable to detect sshPort setting in /etc/osgi-runner/conf.d/gogo-ssh.properties"
  exit 1
fi

ssh -p $SSHPORT localhost $*
