error validate

This commit is contained in:
Michael Stanclift 2020-06-03 00:11:02 -05:00
parent 529789a4c1
commit 89740497e9

View File

@ -652,12 +652,15 @@ function create_rsynccmd {
if [ -z "$SSHPASSWORD" ]
then
rsync -e "${SSH_CMD} -p ${SSH_PORT} -i $HOME/${SSH_PKIF}" ${REMOTE_USER}@${REMOTE_HOST}:${RSYNC_SOURCE} ${RSYNC_TARGET}
error_validate
else
rsync -e "${SSHPASSWORD} ${SSH_CMD} -p ${SSH_PORT} -i $HOME/${SSH_PKIF}" ${REMOTE_USER}@${REMOTE_HOST}:${RSYNC_SOURCE} ${RSYNC_TARGET}
error_validate
fi
elif hash dbclient 2>/dev/null
then
rsync -e "${SSH_CMD} -p ${SSH_PORT} -i $HOME/${SSH_PKIF}" ${REMOTE_USER}@${REMOTE_HOST}:${RSYNC_SOURCE} ${RSYNC_TARGET}
error_validate
fi
}