Skip to content

Commit

Permalink
Fix for the awk version in debian 7.3 (by not using awk)
Browse files Browse the repository at this point in the history
  • Loading branch information
Faye Salwin committed Feb 26, 2014
1 parent 375ca21 commit 981f0b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/logstash.sysv.debian
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ case "$1" in
log_daemon_msg "Starting $DESC"

# Parse the actual JAVACMD from the process' environment, we don't care about errors.
JAVA=$(cat /proc/$(cat ${PID_FILE} 2>/dev/null)/environ 2>/dev/null | awk -F= 'BEGIN {RS="\0"} /JAVACMD/ {print $2}')
JAVA=$(cat /proc/$(cat "${PID_FILE}" 2>/dev/null)/environ 2>/dev/null | grep -z ^JAVACMD= | cut -d= -f2)
if start-stop-daemon --test --start --pidfile "$PID_FILE" \
--user "$LS_USER" --exec "$JAVA" \
>/dev/null; then
Expand All @@ -98,7 +98,7 @@ case "$1" in
sleep 1

# Parse the actual JAVACMD from the process' environment, we don't care about errors.
JAVA=$(cat /proc/$(cat ${PID_FILE} 2>/dev/null)/environ 2>/dev/null | awk -F= 'BEGIN {RS="\0"} /JAVACMD/ {print $2}')
JAVA=$(cat /proc/$(cat "${PID_FILE}" 2>/dev/null)/environ 2>/dev/null | grep -z ^JAVACMD= | cut -d= -f2)
if start-stop-daemon --test --start --pidfile "$PID_FILE" \
--user "$LS_USER" --exec "$JAVA" \
>/dev/null; then
Expand Down Expand Up @@ -146,7 +146,7 @@ case "$1" in
set +e

# Parse the actual JAVACMD from the process' environment, we don't care about errors.
JAVA=$(cat /proc/$(cat ${PID_FILE} 2>/dev/null)/environ 2>/dev/null | awk -F= 'BEGIN {RS="\0"} /JAVACMD/ {print $2}')
JAVA=$(cat /proc/$(cat "${PID_FILE}" 2>/dev/null)/environ 2>/dev/null | grep -z ^JAVACMD= | cut -d= -f2)
start-stop-daemon --test --start --pidfile "$PID_FILE" \
--user "$LS_USER" --exec "$JAVA" \
>/dev/null 2>&1
Expand Down

0 comments on commit 981f0b9

Please sign in to comment.