mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
New rsync validation method
This commit is contained in:
parent
c13ca47f06
commit
e725ab7f5d
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user