diff options
-rwxr-xr-x | bin/ftpsync | 4 | ||||
-rw-r--r-- | etc/common | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/ftpsync b/bin/ftpsync index ff2536b..139b884 100755 --- a/bin/ftpsync +++ b/bin/ftpsync @@ -408,8 +408,8 @@ fi # run!) trap cleanup ERR TERM HUP INT QUIT -# Start log by redirecting everything there. -exec >"$LOG" 2>&1 </dev/null +# Start log by redirecting stdout and stderr there and closing stdin +exec >"$LOG" 2>&1 <&- log "Mirrorsync start" # Look who pushed us and note that in the log. @@ -93,7 +93,7 @@ signal () { # Default normal "fire and forget" push. We background that, we do not care about the mirrors doings echo "Sending normal push" >> "${LOGDIR}/${MIRROR}.log" PUSHARGS1="sync:all" - ssh $SSH_OPTIONS "${HOSTNAME}" "${PUSHARGS} ${PUSHARGS1}" >>"${LOGDIR}/${MIRROR}.log" 2>&1 & + ssh -f $SSH_OPTIONS "${HOSTNAME}" "${PUSHARGS} ${PUSHARGS1}" >>"${LOGDIR}/${MIRROR}.log" elif [ "xstagedx" = "x${PUSHTYPE}x" ] || [ "xmhopx" = "x${PUSHTYPE}x" ]; then # Want a staged push. Fine, lets do that. Not backgrounded. We care about the mirrors doings. echo "Sending staged push" >> "${LOGDIR}/${MIRROR}.log" |