#!/bin/sh
# Filename: sig_rcp
# Sends files via rcp -p, syntax:
# sig_rcp SourcePath DestPath DestHost User
trap "" HUP
SourcePath=$1
DestPath=$2
DestHost=$3
# For security, you an always hard code in the username here.
User=$4

# Error checking: Make sure each string has a value.

if [ "${SourcePath}"  = "" ]; then exit 1; fi
if [ "${DestPath}"    = "" ]; then exit 1; fi
if [ "${DestHost}"   = "" ]; then exit 1; fi
if [ "${User}"       = "" ]; then exit 1; fi

rcp -p $SourcePath $User@$DestHost:$DestPath

exit $?

