#!/bin/sh

# Redirect stderr to stdout
exec 2>&1

if test ${1} = "start"; then
  echo "starting ${2}..."

  RUN_OPTS=""
  {{#user}}
  RUN_OPTS="$RUN_OPTS -u {{user}}"
  {{/user}}

  exec runtool $RUN_OPTS {{_embedded_root_dir}}/flume/bin/flume-ng \
    agent \
    --name api-umbrella-agent \
    --conf {{_embedded_root_dir}}/flume/conf \
    --conf-file {{etc_dir}}/flume.properties
fi

exit 0

#!/bin/sh

# Redirect stderr to stdout
exec 2>&1

if test ${1} = "start"; then
  echo "starting ${2}..."

  RUN_OPTS=""
  {{#user}}
  RUN_OPTS="$RUN_OPTS -u {{user}}"
  {{/user}}

  exec runtool $RUN_OPTS {{_embedded_root_dir}}/flume/bin/flume-ng \
    agent \
    --name api-umbrella-agent \
    --conf {{_embedded_root_dir}}/flume/conf \
    --conf-file {{etc_dir}}/flume.properties \
    -Dflume.log.dir={{log_dir}}/flume
fi

exit 0

Fix flume log output directory.
Fix flume log output directory.
