diff --git a/gravity-sync.sh b/gravity-sync.sh index 41b9d3d..cb494c3 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -654,7 +654,7 @@ function ssh_function { fi elif hash dbclient 2>/dev/null 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 }