<commit_before>#!/bin/bash
NIC="eth0"
name="dnsmasq"
export MY_IP=$(ifconfig $NIC | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')
[ ! -d dnsmasq.hosts ] && mkdir dnsmasq.hosts
[ -e dnsmasq.hosts/calavera ] && rm dnsmasq.hosts/calavera

echo "-- Destroying current environment"
docker ps |grep dnsmasq > /dev/null 2>&1
if [ $? -eq "0" ] 
then
  echo -n " -- Removing dnsmasq container :"
  docker stop dnsmasq > /dev/null
  docker rm dnsmasq > /dev/null
  echo "Ok"
fi

# Start dnsmasq server
echo -n " -- Starting dnsmasq container :"
docker run -v="$(pwd)/dnsmasq.hosts:/dnsmasq.hosts" -name=${name} -p=${MY_IP}':53:5353/udp' -d sroegner/dnsmasq > /tmp/out 2>&1
if [ $? -ne 0 ]
then
  echo "Error"
  cat /tmp/out
  exit 1
else<commit_msg>Added -- (double minus) to the --name option for docker run command<commit_after>#!/bin/bash
NIC="eth0"
name="dnsmasq"
export MY_IP=$(ifconfig $NIC | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')
[ ! -d dnsmasq.hosts ] && mkdir dnsmasq.hosts
[ -e dnsmasq.hosts/calavera ] && rm dnsmasq.hosts/calavera

echo "-- Destroying current environment"
docker ps |grep dnsmasq > /dev/null 2>&1
if [ $? -eq "0" ] 
then
  echo -n " -- Removing dnsmasq container :"
  docker stop dnsmasq > /dev/null
  docker rm dnsmasq > /dev/null
  echo "Ok"
fi

# Start dnsmasq server
echo -n " -- Starting dnsmasq container :"
docker run -v="$(pwd)/dnsmasq.hosts:/dnsmasq.hosts" --name=${name} -p=${MY_IP}':53:5353/udp' -d sroegner/dnsmasq > /tmp/out 2>&1
if [ $? -ne 0 ]
then
  echo "Error"
  cat /tmp/out
  exit 1
else
{'fraction_non_alphanumeric': 0.17684078036500944, 'fraction_numerical': 0.027690371302706105, 'mean_word_length': 3.332425068119891, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2436939', 'n_tokens_mistral': 747, 'n_tokens_neox': 674, 'n_words': 177}