<commit_before>#!/bin/bash

PIDFILE=/var/run/consul.pid
CONSUL_BIN=/usr/local/bin/consul
ADDR=eth0
RUN_SERVER=${RUN_SERVER:auto}

if [ ! -d ${CONSUL_BIN} ];then
   CONSUL_BIN=/usr/bin/consul
fi

# if consul in env, join
LINKED_SERVER=0
for env_line in $(env);do
    if [ $(echo ${env_line} |grep -c CONSUL_SERVER) -ne 0 ];then
        LINKED_SERVER="$(echo ${env_line}|awk -F\= '{print $2}')"
        break
    elif [ $(echo ${env_line} |grep -c PORT_8500_TCP_ADDR) -ne 0 ];then
        LINKED_SERVER="$(echo ${env_line}|awk -F\= '{print $2}')"
        break
    fi
done
if [ "X${NO_CONSUL}" != "X" ];then
    echo "Do not start any docker server"
    touch ${PIDFILE}
else
    if [ "X${LINKED_SERVER}" == "X$(ip -o -4 address show eth0|awk '{print $4}'|awk -F\/ '{print $1}')" ];then
        LINKED_SERVER=0
    fi
    ## Check if eth0 already exists
    IPv4_RAW=$(ip -o -4 addr show ${ADDR})
    EC=$?
    if [ ${EC} -eq 1 ];then
        echo "## Wait for pipework to attach device 'eth0'"
        pipework --wait<commit_msg>typos in the start script<commit_after>#!/bin/bash

PIDFILE=/var/run/consul.pid
CONSUL_BIN=/usr/local/bin/consul
ADDR=eth0
RUN_SERVER=${RUN_SERVER-auto}

if [ ! -f ${CONSUL_BIN} ];then
   CONSUL_BIN=/usr/bin/consul
fi

# if consul in env, join
LINKED_SERVER=0
for env_line in $(env);do
    if [ $(echo ${env_line} |grep -c CONSUL_SERVER) -ne 0 ];then
        LINKED_SERVER="$(echo ${env_line}|awk -F\= '{print $2}')"
        break
    elif [ $(echo ${env_line} |grep -c PORT_8500_TCP_ADDR) -ne 0 ];then
        LINKED_SERVER="$(echo ${env_line}|awk -F\= '{print $2}')"
        break
    fi
done
if [ "X${NO_CONSUL}" != "X" ];then
    echo "Do not start any docker server"
    touch ${PIDFILE}
else
    if [ "X${LINKED_SERVER}" == "X$(ip -o -4 address show eth0|awk '{print $4}'|awk -F\/ '{print $1}')" ];then
        LINKED_SERVER=0
    fi
    ## Check if eth0 already exists
    IPv4_RAW=$(ip -o -4 addr show ${ADDR})
    EC=$?
    if [ ${EC} -eq 1 ];then
        echo "## Wait for pipework to attach device 'eth0'"
        pipework --wait
{'fraction_non_alphanumeric': 0.17504835589941972, 'fraction_numerical': 0.019342359767891684, 'mean_word_length': 2.948473282442748, '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': '333298', 'n_tokens_mistral': 834, 'n_tokens_neox': 795, 'n_words': 223}