From c0af8b113fb0b2913c3981684045dc03fa1c099b Mon Sep 17 00:00:00 2001 From: Dirk Date: Mon, 27 Mar 2017 11:29:21 +0200 Subject: [PATCH] FIX #680 --- testssl.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/testssl.sh b/testssl.sh index b67e356..8557e8c 100755 --- a/testssl.sh +++ b/testssl.sh @@ -11123,8 +11123,12 @@ prepare_logging() { else : # just for clarity: a log file was specified, no need to do anything else fi - [[ -e $LOGFILE ]] && fatal "\"$LOGFILE\" exists. Either use \"--append\" or (re)move it" 1 - >$LOGFILE + + if ! "$APPEND"; then + [[ -e $LOGFILE ]] && fatal "\"$LOGFILE\" exists. Either use \"--append\" or (re)move it" 1 + else + >$LOGFILE + fi tmln_out "## Scan started as: \"$PROG_NAME $CMDLINE\"" >>${LOGFILE} tmln_out "## at $HNAME:$OPENSSL_LOCATION" >>${LOGFILE} tmln_out "## version testssl: $VERSION ${GIT_REL_SHORT:-$CVS_REL_SHORT} from $REL_DATE" >>${LOGFILE}