#!/bin/bash

echo "####################################################################################"
echo "## WARNING: This script is deprecated and will be replaced by 'mgr-ssh-push-init' ##"
echo "####################################################################################"

# Check if we are root
if [ 0$UID -gt 0 ]; then
  echo "ERROR: You need to be root in order to run this!"
  exit 1
fi

# Check number of arguments
if [ "$#" -lt 2 -o "$#" -gt 2 ]; then
  me=`basename $0`
  echo "USAGE: ${me} <client> <bootstrap-script>"
  exit 1
else
  CLIENT=${1}
fi

# Call the init script with given parameters
spacewalk-ssh-push-init --client ${CLIENT} --register ${2} --tunnel

