#!/bin/sh . ./config-urls if [ "$1" = 'local' ] ; then ( export local_url="$local_url"; \ export remote_url="$remote_url"; \ cat config "$2" \ ) | ssh root@"$local_url" -T /bin/sh elif [ "$1" = 'remote' ] ; then ( export local_url="$remote_url"; \ export remote_url="$local_url"; \ cat config "$2" \ ) | ssh root@"$remote_url" -T /bin/sh else echo "error: must specify local or remote" fi