<commit_before>#!/bin/bash
set -o errexit

# TODO(SamYaple): After we merge Heka it should be possible to remove
# this symlink, investigate that after Heka is finalized
# NOTE(SamYaple): Setting up logging socket to /dev/log
if [[ ! "${!SKIP_LOG_SETUP[@]}" && -e /var/lib/kolla/rsyslog ]]; then
    while [[ ! -S /var/lib/kolla/rsyslog/log ]]; do
        sleep 1
    done
    sudo ln -sf /var/lib/kolla/rsyslog/log /dev/log
fi

# 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=""

# Run additional commands if present
source kolla_extend_start

echo "Running command: '${CMD}${ARGS:+ $ARGS}'"
exec ${CMD} ${ARGS}<commit_msg>Skip extend_start.sh if KOLLA_SKIP_EXTEND_START is defined<commit_after>#!/bin/bash
set -o errexit

# TODO(SamYaple): After we merge Heka it should be possible to remove
# this symlink, investigate that after Heka is finalized
# NOTE(SamYaple): Setting up logging socket to /dev/log
if [[ ! "${!SKIP_LOG_SETUP[@]}" && -e /var/lib/kolla/rsyslog ]]; then
    while [[ ! -S /var/lib/kolla/rsyslog/log ]]; do
        sleep 1
    done
    sudo ln -sf /var/lib/kolla/rsyslog/log /dev/log
fi

# 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}
{'fraction_non_alphanumeric': 0.13665743305632502, 'fraction_numerical': 0.0018467220683287165, 'mean_word_length': 3.5911016949152543, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2807347', 'n_tokens_mistral': 797, 'n_tokens_neox': 763, 'n_words': 240}