Skip to content

Commit

Permalink
Fixed issue with notify daemon. (#56)
Browse files Browse the repository at this point in the history
* Fixed issue with notify daemon.
* Improving error message on scp failure.
  • Loading branch information
jonn-smith authored Feb 22, 2019
1 parent 044d549 commit 4230e2e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cromshell
Original file line number Diff line number Diff line change
Expand Up @@ -1107,8 +1107,9 @@ function notify()
error "Creating notification daemon on host ${hostServer} ..."

# Send the script to the server:
scp ${SCRIPTDIR}/${SCRIPTNAME} ${hostServer}:~/. &> /dev/null
[[ $? -ne 0 ]] && error "ERROR: Could not copy cromshell to server ${hostServer}" && exit 7
local tmpOut=$( makeTemp )
scp ${SCRIPTDIR}/${SCRIPTNAME} ${hostServer}:~/. &> ${tmpOut}
[[ $? -ne 0 ]] && error "ERROR: Could not copy cromshell to server ${hostServer}" && error "$(cat ${tmpOut})" && exit 7

# Spin off notification process on the server:
results=$( ssh ${hostServer} "~/${SCRIPTNAME} notify ${WORKFLOW_ID} ${email} ${WORKFLOW_SERVER_URL}" )
Expand Down Expand Up @@ -1407,9 +1408,7 @@ if ${ISINTERACTIVESHELL} ; then

# Check if we need to set this up.
# Note: because of how `notify` works, we can't require the setup for the notify action.
#if ${CROMWELL_NEEDS_SETUP} && [[ "${SUB_COMMAND}" != "notify" ]] ; then
if ${CROMWELL_NEEDS_SETUP} ; then

if ${CROMWELL_NEEDS_SETUP} && [[ "${SUB_COMMAND}" != "notify" ]] ; then
# We need to setup this install.
# Now let's set it up:
which dialog &> /dev/null
Expand Down

0 comments on commit 4230e2e

Please sign in to comment.