<commit_before>#!/bin/bash
CTRLAPP="/usr/local/bin/buildslave"
function shutdown()
{
  $CTRLAPP stop ${SLAVEDIR}
  exit 0
}

function startup()
{
  if [ ! -d "${SLAVEDIR}" ]; then
    $CTRLAPP create-slave ${SLAVEDIR} ${MASTERHOST} ${SLAVENAME} ${SLAVEPASSWORD}
    echo "${BOTADMIN} <${BOTEMAIL}>" > ${SLAVEDIR}/info/admin
    echo "${BOTHOST}" > ${SLAVEDIR}/info/host
  fi
  # Remove the security relevant variable from the environment
  unset MASTERHOST
  unset SLAVEPASSWORD
  unset BOTADMIN
  unset BOTEMAIL
  unset BOTHOST
  $CTRLAPP start ${SLAVEDIR}
  echo "Remember to update the SSH configuration:"
  echo "docker cp \${HOME}/.ssh ${SLAVENAME}:${HOME}/"
  echo "docker cp \${HOME}/.pypirc ${SLAVENAME}:${HOME}/"
  echo "docker exec ${SLAVENAME} --user root chown -R buildbot ${HOME}/"
}

trap shutdown TERM SIGTERM SIGKILL SIGINT

startup;

# Just idle for one hour and keep the process alive
# waiting for SIGTERM.
while : ; do
sleep 3600 & wait
done
#
echo "The endless loop terminated, something is wrong here."
exit 1
<commit_msg>Fixed the scripts in the entrypoint<commit_after>#!/bin/bash
CTRLAPP="/usr/local/bin/buildslave"
function shutdown()
{
  $CTRLAPP stop ${SLAVEDIR}
  exit 0
}

function startup()
{
  if [ ! -d "${SLAVEDIR}" ]; then
    $CTRLAPP create-slave ${SLAVEDIR} ${MASTERHOST} ${SLAVENAME} ${SLAVEPASSWORD}
    echo "${BOTADMIN} <${BOTEMAIL}>" > ${SLAVEDIR}/info/admin
    echo "${BOTHOST}" > ${SLAVEDIR}/info/host
  fi
  # Remove the security relevant variables from the environment
  # Otherwise, they will be listed as clear text in the buildbot 
  # logs that are publicly available.
  unset MASTERHOST
  unset SLAVEPASSWORD
  unset BOTADMIN
  unset BOTEMAIL
  unset BOTHOST
  $CTRLAPP start ${SLAVEDIR}
  echo "Remember to update the SSH configuration:"
  echo "docker cp \${HOME}/.ssh ${SLAVENAME}:${HOME}/"
  echo "docker cp \${HOME}/.pypirc ${SLAVENAME}:${HOME}/"
  echo "docker exec --user root ${SLAVENAME} find ${HOME} ! -user buildbot -exec chown buildbot {} \\;"
}

trap shutdown TERM SIGTERM SIGKILL SIGINT

startup;

# Just idle for one hour and keep the process alive
# waiting for SIGTERM.
while : ; do
sleep 3600 & wait
done
#
echo "The endless loop terminated, something is wrong here."
exit 1

{'fraction_non_alphanumeric': 0.13000890471950133, 'fraction_numerical': 0.005342831700801425, 'mean_word_length': 4.083710407239819, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '479649', 'n_tokens_mistral': 809, 'n_tokens_neox': 793, 'n_words': 252}