<commit_before>#!/bin/bash

if [ ! "$(ls -A $JTS3_DIR/config/)" ]; then
    echo "=> JTS3 Config volume is empty, copying default files to volume"
    cp -r "$JTS3_DIR/default_config/*" "$JTS3_DIR/config/"
fi

echo "-> Updating user and group id if necessary ..."
if [ "$JTS3_USER" != "3000" ]; then
    usermod -u "#$JTS3_USER" jts3servermod
fi
if [ "$JTS3_GROUP" != "3000" ]; then
    groupmod -g "#$JTS3_GROUP" jts3servermod
fi

echo "-> Correcting mount point permissions ..."
chown "$JTS3_USER":"$JTS3_GROUP" -R "$JTS3_DIR"
echo "=> Corrected mount point permissions."

cd "$JTS3_DIR" || exit 1
echo "=> Starting JTS3ServerMod by Stefan1200 (https://www.stefan1200.de) ..."
exec gosu "$JTS3_USER" java "$JTS3_JAVA_ARGS" -jar "$JTS3_DIR/JTS3ServerMod.jar"<commit_msg>Set group for gosu too<commit_after>#!/bin/bash

if [ ! "$(ls -A $JTS3_DIR/config/)" ]; then
    echo "=> JTS3 Config volume is empty, copying default files to volume"
    cp -r "$JTS3_DIR/default_config/*" "$JTS3_DIR/config/"
fi

echo "-> Updating user and group id if necessary ..."
if [ "$JTS3_USER" != "3000" ]; then
    usermod -u "#$JTS3_USER" jts3servermod
fi
if [ "$JTS3_GROUP" != "3000" ]; then
    groupmod -g "#$JTS3_GROUP" jts3servermod
fi

echo "-> Correcting mount point permissions ..."
chown "$JTS3_USER":"$JTS3_GROUP" -R "$JTS3_DIR"
echo "=> Corrected mount point permissions."

cd "$JTS3_DIR" || exit 1
echo "=> Starting JTS3ServerMod by Stefan1200 (https://www.stefan1200.de) ..."
exec gosu "$JTS3_USER":"$JTS3_GROUP" java "$JTS3_JAVA_ARGS" -jar "$JTS3_DIR/JTS3ServerMod.jar"
{'fraction_non_alphanumeric': 0.16613418530351437, 'fraction_numerical': 0.04664536741214057, 'mean_word_length': 4.20265780730897, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '6132828', 'n_tokens_mistral': 650, 'n_tokens_neox': 605, 'n_words': 161}