stderror still open after calling /etc/init.d/logstash start
You should redirect stderror AND stdout of logstash to /dev/null, so all outputs are closed cleanly and automation tools reading the output of the init-script can quit cleanly.
This commit is contained in:
Jan Gaedicke 2014-03-28 09:31:48 +01:00
parent 942d3550a3
commit b91bf22fc7
2 changed files with 4 additions and 4 deletions

View file

@ -80,7 +80,7 @@ do_start()
export PATH HOME JAVA_OPTS LS_HEAP_SIZE LS_JAVA_OPTS LS_USE_GC_LOGGING
test -n "${JAVACMD}" && export JAVACMD
nice -n ${LS_NICE} runuser -s /bin/sh -c "exec $DAEMON $DAEMON_OPTS" ${LS_USER} > /dev/null 1>&1 < /dev/null &
nice -n ${LS_NICE} runuser -s /bin/sh -c "exec $DAEMON $DAEMON_OPTS" ${LS_USER} > /dev/null 2>&1 < /dev/null &
RETVAL=$?
local PID=$!
@ -89,7 +89,7 @@ do_start()
JAVA_PID=$(ps axo ppid,pid | awk -v "ppid=$PID" '$1==ppid {print $2}')
PID=${JAVA_PID:-$PID}
echo $PID > $PID_FILE
[ $PID = $JAVA_PID ] && success
[ "$PID" = "$JAVA_PID" ] && success
}
#

View file

@ -79,7 +79,7 @@ do_start()
export PATH HOME JAVA_OPTS LS_HEAP_SIZE LS_JAVA_OPTS LS_USE_GC_LOGGING
test -n "${JAVACMD}" && export JAVACMD
nice -n ${LS_NICE} runuser -s /bin/sh -c "exec $DAEMON $DAEMON_OPTS" ${LS_USER} > /dev/null 1>&1 < /dev/null &
nice -n ${LS_NICE} runuser -s /bin/sh -c "exec $DAEMON $DAEMON_OPTS" ${LS_USER} > /dev/null 2>&1 < /dev/null &
RETVAL=$?
local PID=$!
@ -88,7 +88,7 @@ do_start()
JAVA_PID=$(ps axo ppid,pid | awk -v "ppid=$PID" '$1==ppid {print $2}')
PID=${JAVA_PID:-$PID}
echo $PID > $PID_FILE
[ $PID = $JAVA_PID ] && success
[ "$PID" = "$JAVA_PID" ] && success
}
#