<commit_before>#!/usr/bin/env bash
#
# Generate systemd service file for Bento and write it to
# the standard location for service files

if [ -z "$SERVICE_NAME" ]
then
    SERVICE_NAME=bento
fi

if [ -z "$BENTO_HOME" ]
then
    BENTO_HOME=/opt/$SERVICE_NAME
fi

cat > /usr/lib/systemd/system/$SERVICE_NAME.service <<EOF
[Unit]
Description=BentoServer
After=syslog.target
After=network.target

[Service]
Type=simple
ExecStart=$BENTO_HOME/bin/bentoserver.sh start
ExecStop=$BENTO_HOME/bin/bentoserver.sh stop
ExecReload=$BENTO_HOME/bin/bentoserver.sh restart
Restart=on-success
User=bento
Group=bento
TimeoutSec=300

[Install]
WantedBy=multi-user.target<commit_msg>more work on service generator<commit_after>#!/usr/bin/env bash
#
# Generate systemd service file for Bento and write it to
# the standard location for service files

if [ -z "$SERVICE_NAME" ]
then
    SERVICE_NAME=bento
fi

if [ -z "$BENTO_HOME" ]
then
    BENTO_HOME=/opt/$SERVICE_NAME
fi

if [ -z "$BENTO_SH" ]
then
    BENTO_SH=$BENTO_HOME/bin/bentoserver.sh
fi


cat > /usr/lib/systemd/system/$SERVICE_NAME.service <<EOF
[Unit]
Description=BentoServer
After=syslog.target
After=network.target

[Service]
Type=simple
ExecStart=$BENTO_SH start
ExecStop=$BENTO_SH stop
ExecReload=$BENTO_SH restart
Restart=on-success
User=bento
Group=bento
TimeoutSec=300

[Install]
WantedBy=multi-user.target
{'fraction_non_alphanumeric': 0.10898379970544919, 'fraction_numerical': 0.004418262150220913, 'mean_word_length': 5.4714285714285715, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '4476084', 'n_tokens_mistral': 517, 'n_tokens_neox': 507, 'n_words': 111}