From: Dan Timoney Date: Mon, 16 Oct 2017 14:35:18 +0000 (-0400) Subject: Create ueb-listener logs directory X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=9d407f7116f88815ba18391f20d1e0890dbb61c2;p=sdnc%2Foam.git Create ueb-listener logs directory Need to create logs directory before exec call to redirect output there. Change-Id: Ic435006a60cbe4c3e960cc6c5d8fb9b1bf051134 Issue-ID: SDNC-129 Signed-off-by: Dan Timoney --- diff --git a/installation/ueb-listener/src/main/scripts/start-ueb-listener.sh b/installation/ueb-listener/src/main/scripts/start-ueb-listener.sh index 762d1bd6..64fb589f 100644 --- a/installation/ueb-listener/src/main/scripts/start-ueb-listener.sh +++ b/installation/ueb-listener/src/main/scripts/start-ueb-listener.sh @@ -32,21 +32,20 @@ JAVA_OPTS=${JAVA_OPTS:--Dhttps.protocols=TLSv1.1,TLSv1.2} JAVA=${JAVA:-${JAVA_HOME}/bin/java} # Redirect output from script to $LISTENER.out -exec >> ${UEBLISTENERROOT}/logs/$LISTENER.out -exec 2>&1 - - if [ ! -d ${UEBLISTENERROOT}/logs ] then mkdir ${UEBLISTENERROOT}/logs fi +exec >> ${UEBLISTENERROOT}/logs/$LISTENER.out +exec 2>&1 for file in ${UEBLISTENERROOT}/lib/*.jar do LISTENERCLASSPATH=$LISTENERCLASSPATH:$file done -exec ${JAVA} ${JAVA_OPTS} -jar ${UEBLISTENERROOT}/lib/ueb-listener*.jar -Dlog4j.configuration=file:${UEBLISTENERROOT}/lib/log4j.properties -cp ${LISTENERCLASSPATH} & +echo "Starting ueb-listener" +exec ${JAVA} ${JAVA_OPTS} -jar ${UEBLISTENERROOT}/lib/ueb-listener*.jar -Dlog4j.configuration=file:${UEBLISTENERROOT}/lib/log4j.properties -cp ${LISTENERCLASSPATH}