<commit_before>#!/bin/bash
# 
# 
# Author: alex
# Created Time: 2017年09月29日 星期五 15时51分53秒
set -e

# Add elasticsearch as command if needed
if [ "${1:0:1}" = '-' ]; then
    set -- elasticsearch "$@"
fi

if [ "$(id -u)" = '0' ]; then
    echo "root is ok"
else
    echo "You must run by root!"
    exit 1
fi

# Change the ownership of user-mutable directories to elasticsearch
for path in \
    /usr/share/elasticsearch/data \
    /usr/share/elasticsearch/logs \
    ; do
    if [ -d "$path" ]; then
        echo "change $path to elasticsearch"
        chown -R elasticsearch:elasticsearch "$path"
    fi
done

# 使用特定的用户运行
set -- gosu elasticsearch "$@"

# As argument is not related to elasticsearch,
# then assume that user wants to run his own process,
# for example a `bash` shell to explore this image
exec "$@"
<commit_msg>es user<commit_after>#!/bin/bash
# 
# 
# Author: alex
# Created Time: 2017年09月29日 星期五 15时51分53秒
set -e

# Add elasticsearch as command if needed
if [ "${1:0:1}" = '-' ]; then
    set -- elasticsearch "$@"
fi

if [ "$(id -u)" = '0' ]; then
    echo "root is ok"
else
    echo "You must run by root!"
    exit 1
fi

# Change the ownership of user-mutable directories to elasticsearch
for path in \
    /usr/share/elasticsearch/data \
    /usr/share/elasticsearch/logs \
    /usr/share/elasticsearch/config \
    ; do
    if [ -d "$path" ]; then
        echo "change $path to elasticsearch"
        chown -R elasticsearch:elasticsearch "$path"
    fi
done

# 使用特定的用户运行
set -- gosu elasticsearch "$@"

# As argument is not related to elasticsearch,
# then assume that user wants to run his own process,
# for example a `bash` shell to explore this image
exec "$@"

{'fraction_non_alphanumeric': 0.12026066350710901, 'fraction_numerical': 0.022511848341232227, 'mean_word_length': 2.882758620689655, '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': '1667238', 'n_tokens_mistral': 605, 'n_tokens_neox': 581, 'n_words': 204}