Permalink
Browse files

Update base64 decoding to create rsyslog.conf on /config volume mount.

  • Loading branch information...
tgjamin committed Apr 14, 2018
1 parent 6409496 commit c29d8d95cace8a37e4f2e789c59ea96cf117688b
Showing with 12 additions and 2 deletions.
  1. +11 −1 appliance/alpine/starter.sh
  2. +1 −1 appliance/alpine/tools/rsyslog
@@ -26,9 +26,19 @@ fi
# Useful to inject rsyslog.conf file without mounting it into the container
if [ ! -z "$RSYSLOG_CONFIG_BASE64" ]; then
echo "Writing RSYSLOG_CONFIG_BASE64"
echo "$RSYSLOG_CONFIG_BASE64" | base64 -d > /etc/rsyslog.conf
echo "$RSYSLOG_CONFIG_BASE64" | base64 -d > /config/rsyslog.conf
export RSYSLOG_CONF="/config/rsyslog.conf"
fi
# If RSYSLOG_CONF is empty, we want to default to /etc/rsyslog.conf
# This allows the user to overwrite what configuration file is being used
if [ -z "$RSYSLOG_CONF" ]; then
export RSYSLOG_CONF="/etc/rsyslog.conf"
fi
echo "Using rsyslog configuration file: $RSYSLOG_CONF"
if [ -f tools/$1 ]; then
source tools/$1
else
@@ -1,3 +1,3 @@
# This NEEDS to be sourced (else we don't get PID 1!)
source internal/build-config
exec $VALGRIND /usr/sbin/rsyslogd -n $RSYSLOG_DEBUG_FLAG -f/etc/rsyslog.conf
exec $VALGRIND /usr/sbin/rsyslogd -n $RSYSLOG_DEBUG_FLAG -f$RSYSLOG_CONF

0 comments on commit c29d8d9

Please sign in to comment.