<commit_before>#!/bin/sh

#
# chkconfig: - 80 20
# processname: <%= @id %>
# description: Knotx - reactive microservice assembler
#

### BEGIN INIT INFO
# Provides: <%= @id %>
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start:
# Default-Stop:
# Short-Description: start and stop <%= @id %>
### END INIT INFO

. /etc/rc.d/init.d/functions

CONFIG_FILE="<%= @home_dir %>/knotx.conf"

[ -e $CONFIG_FILE ] && . $CONFIG_FILE

start()
{
  echo -n $"Starting <%= @id %>: "
  runuser -l "<%= @user %>" -c "<%= @java_home %>/bin/java \
  ${KNOTX_GENERAL_OPTS} \
  ${KNOTX_GC_OPTS} \
  ${KNOTX_JMX_OPTS} \
  ${KNOTX_DEBUG_OPTS} \
  -Xms${KNOTX_MIN_HEAP}m \
  -Xmx${KNOTX_MAX_HEAP}m \
  -XX:+UseBiasedLocking \
  -XX:BiasedLockingStartupDelay=0 \
  -Dlogback.configurationFile=<%= ::File.join(@conf_dir, 'logback.xml') %> \
  -Dvertx.logger-delegate-factory-class-name=io.vertx.core.logging.SLF4JLogDelegateFactory \
  -Dknotx.home=<%= @home_dir %> \
  -Dvertx.cacheDirBase=<%= ::File.join(@home_dir, '.vertx' ) %> \
  -Dvertx.cli.usage.prefix=knotx \
  -classpath ':<%= @conf_dir %>:<%= ::File.join(@lib_dir, '*') %>' \
  $KNOTX_EXTRA_OPTS \
  io.vertx.core.Launcher run-knotx 2>&1 &" && echo_success || echo_failure
  RETVAL=$?
  echo
  if [ $RETVAL -ne 0 ] ; then
    echo "Error while starting <%= @id %>. Error code from java: [$RETVAL]"
  fi
}

get_pid()
{<commit_msg>Redirect initial knot.x output to /dev/null<commit_after>#!/bin/sh

#
# chkconfig: - 80 20
# processname: <%= @id %>
# description: Knotx - reactive microservice assembler
#

### BEGIN INIT INFO
# Provides: <%= @id %>
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start:
# Default-Stop:
# Short-Description: start and stop <%= @id %>
### END INIT INFO

. /etc/rc.d/init.d/functions

CONFIG_FILE="<%= @home_dir %>/knotx.conf"

[ -e $CONFIG_FILE ] && . $CONFIG_FILE

start()
{
  echo -n $"Starting <%= @id %>: "
  runuser -l "<%= @user %>" -c "<%= @java_home %>/bin/java \
  ${KNOTX_GENERAL_OPTS} \
  ${KNOTX_GC_OPTS} \
  ${KNOTX_JMX_OPTS} \
  ${KNOTX_DEBUG_OPTS} \
  -Xms${KNOTX_MIN_HEAP}m \
  -Xmx${KNOTX_MAX_HEAP}m \
  -XX:+UseBiasedLocking \
  -XX:BiasedLockingStartupDelay=0 \
  -Dlogback.configurationFile=<%= ::File.join(@conf_dir, 'logback.xml') %> \
  -Dvertx.logger-delegate-factory-class-name=io.vertx.core.logging.SLF4JLogDelegateFactory \
  -Dknotx.home=<%= @home_dir %> \
  -Dvertx.cacheDirBase=<%= ::File.join(@home_dir, '.vertx' ) %> \
  -Dvertx.cli.usage.prefix=knotx \
  -classpath ':<%= @conf_dir %>:<%= ::File.join(@lib_dir, '*') %>' \
  $KNOTX_EXTRA_OPTS \
  io.vertx.core.Launcher run-knotx >> /dev/null 2>&1 &" && echo_success || echo_failure
  RETVAL=$?
  echo
  if [ $RETVAL -ne 0 ] ; then
    echo "Error while starting <%= @id %>. Error code from java: [$RETVAL]"
  fi
}

get_pid()
{
{'fraction_non_alphanumeric': 0.2053539978865798, 'fraction_numerical': 0.0063402606551602675, 'mean_word_length': 3.725457570715474, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3209903', 'n_tokens_mistral': 1265, 'n_tokens_neox': 1187, 'n_words': 198}