<commit_before>#!/bin/bash
MIMDIR="/opt/mongooseim/rel/mongooseim/bin"

if [ -n "$HOSTNAME" ]; then
    VMARGS=/opt/mongooseim/rel/mongooseim/etc/vm.args
    echo "-kernel inet_dist_listen_min 9100 inet_dist_listen_max 9100" >> $VMARGS
    SEDARG="-i 's/sname mongooseim@localhost/sname mongooseim@$HOSTNAME/g' $VMARGS"
    eval sed "$SEDARG"
fi

if [ -n "$CLUSTER_WITH" ]; then
    $MIMDIR/mongooseimctl add_to_cluster mongooseim@$CLUSTER_WITH
fi

if [ "$#" -ne 1 ]; then
   $MIMDIR/mongooseim live --noshell -noinput +Bd -mnesia dir \"/data/mnesia/\"
else
   $MIMDIR/mongooseimctl $1
fi
<commit_msg>fix clustering problem introduced after redirecting mnesia<commit_after>#!/bin/bash
MIMDIR="/opt/mongooseim/rel/mongooseim/"

if [ -n "$HOSTNAME" ]; then
    VMARGS=/opt/mongooseim/rel/mongooseim/etc/vm.args
    echo "-kernel inet_dist_listen_min 9100 inet_dist_listen_max 9100" >> $VMARGS
    SEDARG="-i 's/sname mongooseim@localhost/sname mongooseim@$HOSTNAME/g' $VMARGS"
    eval sed "$SEDARG"
fi


if [ -n "$CLUSTER_WITH" ]; then
   $MIMDIR/bin/mongooseimctl add_to_cluster mongooseim@$CLUSTER_WITH
fi

mkdir -p "$MIMDIR/Mnesia.mongooseim@$HOSTNAME"
ln -sfn "$MIMDIR/Mnesia.mongooseim@$HOSTNAME" "/data/mnesia/Mnesia.mongooseim@$HOSTNAME" 

if [ "$#" -ne 1 ]; then
   $MIMDIR/bin/mongooseim live --noshell -noinput +Bd
else
   $MIMDIR/bin/mongooseimctl $1
fi

{'fraction_non_alphanumeric': 0.1429618768328446, 'fraction_numerical': 0.01466275659824047, 'mean_word_length': 4.33203125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '690539', 'n_tokens_mistral': 582, 'n_tokens_neox': 581, 'n_words': 104}