Skip to content

Commit

Permalink
Add debug output for issue #3840 : --unison-verbose flag is enabled o…
Browse files Browse the repository at this point in the history
…n the background sync option of che-mount as well (#4001)

Change-Id: I143e68b698c6a608ac4878f25fb5f5671134186d
Signed-off-by: Florent BENOIT <[email protected]>
  • Loading branch information
benoitf authored Feb 2, 2017
1 parent f987056 commit ab5c41c
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions dockerfiles/mount/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ else
fi

UNISON_COMMAND="unison /mntssh /mnthost ${UNISON_ARGS}"
debug "Using command ${UNISON_COMMAND}"
if [ $(is_verbose "$@") = true ]; then
debug "Using command ${UNISON_COMMAND}"
fi

eval "${UNISON_COMMAND}"

Expand All @@ -158,5 +160,17 @@ info "INFO: (che mount): Background sync continues every ${UNISON_REPEAT_DELAY_I
info "INFO: (che mount): This terminal will block while the synchronization continues."
info "INFO: (che mount): To stop, issue a SIGTERM or SIGINT, usually CTRL-C."

if [ $(is_verbose "$@") = true ]; then
info "Background sync unison verbose mode"
UNISON_ARGS="-batch -retry 10 -fat -copyonconflict -auto -prefer=newer -repeat=${UNISON_REPEAT_DELAY_IN_SEC}"
else
UNISON_ARGS="-batch -retry 10 -fat -silent -copyonconflict -auto -prefer=newer -repeat=${UNISON_REPEAT_DELAY_IN_SEC} -log=false > /dev/null 2>&1"
fi

UNISON_COMMAND="unison /mntssh /mnthost ${UNISON_ARGS}"
if [ $(is_verbose "$@") = true ]; then
debug "Using command ${UNISON_COMMAND}"
fi

# run application
unison /mntssh /mnthost -batch -retry 10 -fat -silent -copyonconflict -auto -prefer=newer -repeat=${UNISON_REPEAT_DELAY_IN_SEC} -log=false > /dev/null 2>&1
eval "${UNISON_COMMAND}"

0 comments on commit ab5c41c

Please sign in to comment.