<commit_before>#!/bin/sh

chown riak. -R /var/lib/riak

if [ $RANCHER ]; then
    until grep -q '169.254.169.250' /etc/resolv.conf; do
        sleep 1
    done

    IP=$(wget -q -O- http://169.254.169.250/latest/self/container/primary_ip)
else
    IP=$(hostname -I | cut -d" " -f 1)
fi

sed -i /etc/riak/riak.conf \
    -e "s#riak_control = off#riak_control = on#" \
    -e "s#listener.protobuf.internal = 127.0.0.1:8087#listener.protobuf.internal = 0.0.0.0:8087#" \
    -e "s#listener.http.internal = 127.0.0.1:8098#listener.http.internal = 0.0.0.0:8098#" \
    -e "s#nodename = riak@127.0.0.1#nodename = riak@$IP#" \
    -e "s#storage_backend = bitcask##" \
    -e "s#log.console = file#log.console = console#"

[ "_$CERT_DIR" = "_" ] && \
sed -i /etc/riak/riak.conf \
    -e "s#listener.http.internal = 0.0.0.0:8098#listener.https.internal = 0.0.0.0:8098#" \

for i in map_pool_size reduce_pool_size hook_pool_size; do
    grep -q "^javascript.$i" /etc/riak.riak.conf || \<commit_msg>Bug in config generation<commit_after>#!/bin/sh

chown riak. -R /var/lib/riak

if [ $RANCHER ]; then
    until grep -q '169.254.169.250' /etc/resolv.conf; do
        sleep 1
    done

    IP=$(wget -q -O- http://169.254.169.250/latest/self/container/primary_ip)
else
    IP=$(hostname -I | cut -d" " -f 1)
fi

sed -i /etc/riak/riak.conf \
    -e "s#riak_control = off#riak_control = on#" \
    -e "s#listener.protobuf.internal = 127.0.0.1:8087#listener.protobuf.internal = 0.0.0.0:8087#" \
    -e "s#listener.http.internal = 127.0.0.1:8098#listener.http.internal = 0.0.0.0:8098#" \
    -e "s#nodename = riak@127.0.0.1#nodename = riak@$IP#" \
    -e "s#storage_backend = bitcask##" \
    -e "s#log.console = file#log.console = console#"

[ "_$CERT_DIR" = "_" ] || \
sed -i /etc/riak/riak.conf \
    -e "s#listener.http.internal = 0.0.0.0:8098#listener.https.internal = 0.0.0.0:8098#" \

for i in map_pool_size reduce_pool_size hook_pool_size; do
    grep -q "^javascript.$i" /etc/riak.riak.conf || \
{'fraction_non_alphanumeric': 0.1964735516372796, 'fraction_numerical': 0.08463476070528968, 'mean_word_length': 2.7191011235955056, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 18, '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': '7209964', 'n_tokens_mistral': 967, 'n_tokens_neox': 878, 'n_words': 151}