New rsync validation method

This commit is contained in:
Michael Stanclift 2020-07-09 10:02:51 -05:00
parent c13ca47f06
commit e725ab7f5d

View File

@ -1017,16 +1017,22 @@ function detect_remotersync {
MESSAGE="Validating RSYNC Installed on ${REMOTE_HOST}" MESSAGE="Validating RSYNC Installed on ${REMOTE_HOST}"
echo_stat echo_stat
${SSHPASSWORD} ${SSH_CMD} -p ${SSH_PORT} -i "$HOME/${SSH_PKIF}" ${REMOTE_USER}@${REMOTE_HOST} "hash rsync" 2>/dev/null CMD_TIMEOUT='15'
CMD_REQUESTED="touch ~/gs.test"
create_sshcmd
if [ "$?" == "0" ] RSYNC_REPATH="rsync"
then RSYNC_SOURCE="${REMOTE_USER}@${REMOTE_HOST}:~/gs.test"
echo_good RSYNC_TARGET="$HOME/${LOCAL_FOLDR}/gs.test"
else create_rsynccmd
echo_fail
MESSAGE="Please install RSYNC on ${REMOTE_HOST}" rm $HOME/${LOCAL_FOLDR}/gs.test
echo_warn
fi CMD_TIMEOUT='15'
CMD_REQUESTED="rm ~/gs.test"
create_sshcmd
error_validate
} }
## Error Validation ## Error Validation