Éric Lemoine 14dec25e54 Fix "wait for log socket" in start.sh
The code in docker/base/start.sh that waits for the log socket does
not work because it includes a bad "space" character after "-S".

This patch changes that character to a real "space" character. It
also sets the SKIP_LOG_SETUP envvar for the Heka container.

TrivialFix

Change-Id: I17a3005df5bbd57678350fc77030e44b5ad6acae
2016-03-07 13:21:38 +01:00

25 lines
679 B
Bash

#!/bin/bash
set -o errexit
# Wait for the log socket
if [[ ! "${!SKIP_LOG_SETUP[@]}" && -e /var/lib/kolla/heka ]]; then
while [[ ! -S /var/lib/kolla/heka/log ]]; do
sleep 1
done
fi
# Processing /var/lib/kolla/config_files/config.json as root. This is necessary
# to permit certain files to be controlled by the root user which should
# not be writable by the dropped-privileged user, especially /run_command
sudo -E kolla_set_configs
CMD=$(cat /run_command)
ARGS=""
if [[ ! "${!KOLLA_SKIP_EXTEND_START[@]}" ]]; then
# Run additional commands if present
source kolla_extend_start
fi
echo "Running command: '${CMD}${ARGS:+ $ARGS}'"
exec ${CMD} ${ARGS}