diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2026-08-30 11:21:54 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2026-08-30 11:21:54 +0800 |
| commit | 4c1da52f4a7bb71952fa2eaa06b230e9f86ea699 (patch) | |
| tree | 580440684b4a91c06f81a30d52803cb5c04f6566 | |
| parent | 75b44c80a284b793a53723c21840909ed44ba577 (diff) | |
| download | lex-4c1da52f4a7bb71952fa2eaa06b230e9f86ea699.tar.gz | |
| -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}" ) |
