fix: cleanup entrypoint

This commit is contained in:
Stefan Reimer 2023-12-13 17:54:52 +00:00
parent 4db7ec9404
commit ad5bbc0089
2 changed files with 4 additions and 10 deletions

View File

@ -36,6 +36,7 @@ COPY fluent.conf /fluentd/etc/
COPY entrypoint.sh /bin/ COPY entrypoint.sh /bin/
ENV FLUENTD_CONF="fluent.conf" ENV FLUENTD_CONF="fluent.conf"
ENV FLUENTD_OPT=""
ENV LD_PRELOAD="" ENV LD_PRELOAD=""

View File

@ -1,14 +1,5 @@
#!/bin/sh #!/bin/sh
#source vars if file exists
DEFAULT=/etc/default/fluentd
if [ -r $DEFAULT ]; then
set -o allexport
. $DEFAULT
set +o allexport
fi
# If the user has supplied only arguments append them to `fluentd` command # If the user has supplied only arguments append them to `fluentd` command
if [ "${1#-}" != "$1" ]; then if [ "${1#-}" != "$1" ]; then
set -- fluentd "$@" set -- fluentd "$@"
@ -28,6 +19,8 @@ if [ "$1" = "fluentd" ]; then
if [ -n "$SIMPLE_SNIFFER" -a -f "$SIMPLE_SNIFFER" ] ; then if [ -n "$SIMPLE_SNIFFER" -a -f "$SIMPLE_SNIFFER" ] ; then
set -- "$@" -r $SIMPLE_SNIFFER set -- "$@" -r $SIMPLE_SNIFFER
fi fi
set -- "$@" --gemfile /fluentd/Gemfile
fi fi
exec "$@" exec "$@" ${FLUENTD_OPT}