diff options
Diffstat (limited to 'lexd-spool.sh')
| -rwxr-xr-x | lexd-spool.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lexd-spool.sh b/lexd-spool.sh index 9ce9c3b..c0cf632 100755 --- a/lexd-spool.sh +++ b/lexd-spool.sh @@ -101,9 +101,15 @@ while true; do remote_cmd="${remote_cmd} rm -f" remote_cmd="${remote_cmd} '${SPOOL_DIR}/${SPOOL_FILE}'" - print -r -- "${response}" \ + ssh_err=$(print -r -- "${response}" \ | fold -s -w 72 \ - | ssh -F "${SSH_CONFIG}" "${SSH_HOST}" "${remote_cmd}" + | ssh -F "${SSH_CONFIG}" "${SSH_HOST}" "${remote_cmd}" 2>&1 >/dev/null) + ssh_res=$? + + if [ ${ssh_res} -ne 0 ]; then + log_err "SSH error on ${SPOOL_FILE} (code ${ssh_res}): ${ssh_err}" + exit 1 + fi log_info "Finished processing: ${target_word}" ) |
