mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
Preserve status on timeout
This commit is contained in:
parent
e48353724f
commit
4c8b76c15f
@ -648,13 +648,13 @@ function ssh_function {
|
|||||||
then
|
then
|
||||||
if [ -z "$SSHPASSWORD" ]
|
if [ -z "$SSHPASSWORD" ]
|
||||||
then
|
then
|
||||||
SSH_SEND="timeout ${CMD_TIMEOUT} ${SSH_CMD} -p ${SSH_PORT} -i \"$HOME/${SSH_PKIF}\" -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} \"${CMD_REQUESTED}\""
|
SSH_SEND="timeout --preserve-status ${CMD_TIMEOUT} ${SSH_CMD} -p ${SSH_PORT} -i \"$HOME/${SSH_PKIF}\" -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} \"${CMD_REQUESTED}\""
|
||||||
else
|
else
|
||||||
SSH_SEND="timeout ${CMD_TIMEOUT} ${SSHPASSWORD} ${SSH_CMD} -p ${SSH_PORT} -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} \"${CMD_REQUESTED}\""
|
SSH_SEND="timeout --preserve-status ${CMD_TIMEOUT} ${SSHPASSWORD} ${SSH_CMD} -p ${SSH_PORT} -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} \"${CMD_REQUESTED}\""
|
||||||
fi
|
fi
|
||||||
elif hash dbclient 2>/dev/null
|
elif hash dbclient 2>/dev/null
|
||||||
then
|
then
|
||||||
SSH_SEND="timeout ${CMD_TIMEOUT} ${SSH_CMD} -p ${SSH_PORT} -i \"$HOME/${SSH_PKIF}\" ${REMOTE_USER}@${REMOTE_HOST} \"${CMD_REQUESTED}\""
|
SSH_SEND="timeout --preserve-status ${CMD_TIMEOUT} ${SSH_CMD} -p ${SSH_PORT} -i \"$HOME/${SSH_PKIF}\" ${REMOTE_USER}@${REMOTE_HOST} \"${CMD_REQUESTED}\""
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user