<commit_before>#! /usr/bin/env bash

### BEGIN INIT INFO
# Provides:          influxdb
# Required-Start:    $all
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start influxdb at boot time
### END INIT INFO

# this init script supports three different variations:
#  1. New lsb that define start-stop-daemon
#  2. Old lsb that don't have start-stop-daemon but define, log, pidofproc and killproc
#  3. Centos installations without lsb-core installed
#
# In the third case we have to define our own functions which are very dumb
# and expect the args to be positioned correctly.

if [ -r /lib/lsb/init-functions ]; then
    source /lib/lsb/init-functions
fi

DEFAULT=/etc/default/influxdb

if [ -r $DEFAULT ]; then
    source $DEFAULT
fi

if [ "x$NOFILES" == "x" ]; then
    NOFILES=0
fi

if [ $NOFILES -le 0 ]; then
    NOFILES=4096
fi

if [ "x$STDOUT" == "x" ]; then
    STDOUT=/dev/null
fi

echo "Setting ulimit -n $NOFILES"
if ! ulimit -n $NOFILES >/dev/null 2>&1; then
    echo -n "Cannot set the max number of open file descriptors"
fi

function pidofproc() {<commit_msg>Bump up the number of open files.<commit_after>#! /usr/bin/env bash

### BEGIN INIT INFO
# Provides:          influxdb
# Required-Start:    $all
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start influxdb at boot time
### END INIT INFO

# this init script supports three different variations:
#  1. New lsb that define start-stop-daemon
#  2. Old lsb that don't have start-stop-daemon but define, log, pidofproc and killproc
#  3. Centos installations without lsb-core installed
#
# In the third case we have to define our own functions which are very dumb
# and expect the args to be positioned correctly.

if [ -r /lib/lsb/init-functions ]; then
    source /lib/lsb/init-functions
fi

DEFAULT=/etc/default/influxdb

if [ -r $DEFAULT ]; then
    source $DEFAULT
fi

if [ "x$NOFILES" == "x" ]; then
    NOFILES=0
fi

if [ $NOFILES -le 0 ]; then
    NOFILES=65536
fi

if [ "x$STDOUT" == "x" ]; then
    STDOUT=/dev/null
fi

echo "Setting ulimit -n $NOFILES"
if ! ulimit -n $NOFILES >/dev/null 2>&1; then
    echo -n "Cannot set the max number of open file descriptors"
fi

function pidofproc() {
{'fraction_non_alphanumeric': 0.10861099091302466, 'fraction_numerical': 0.016010385114668974, 'mean_word_length': 3.158273381294964, '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': '6556352', 'n_tokens_mistral': 827, 'n_tokens_neox': 777, 'n_words': 300}