<commit_before>description "Druid <%= @node_type %> daemon"

start on runlevel [2345]
stop on runlevel [016]

kill signal INT
kill timeout 10

setuid <%= @user %>
setgid <%= @group %>

script
  exec java -cp <%= @config_dir %>:<%= @install_dir %>/current/lib/* -server <%= @java_opts %> -Duser.timezone=<%= @timezone %> -Dfile.encoding=<%= @encoding %> io.druid.cli.Main server <%= @node_type %> <%= @command_suffix %>
end script

post-start script
  tries=0
  while [ ! `netstat --listen | grep -qE '<%= @port %>|ircd'` ] && [ $tries -lt 3 ]; do
    sleep 1
    tries=$((tries + 1))
  done
end script<commit_msg>Change directory to install dir<commit_after>description "Druid <%= @node_type %> daemon"

start on runlevel [2345]
stop on runlevel [016]

kill signal INT
kill timeout 10

setuid <%= @user %>
setgid <%= @group %>

script
  chdir <%= @install_dir %>/current
  exec java -cp <%= @config_dir %>:<%= @install_dir %>/current/lib/* -server <%= @java_opts %> -Duser.timezone=<%= @timezone %> -Dfile.encoding=<%= @encoding %> io.druid.cli.Main server <%= @node_type %> <%= @command_suffix %>
end script

post-start script
  tries=0
  while [ ! `netstat --listen | grep -qE '<%= @port %>|ircd'` ] && [ $tries -lt 3 ]; do
    sleep 1
    tries=$((tries + 1))
  done
end script
{'fraction_non_alphanumeric': 0.19140625, 'fraction_numerical': 0.0203125, 'mean_word_length': 3.9269230769230767, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, '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': '2629201', 'n_tokens_mistral': 527, 'n_tokens_neox': 452, 'n_words': 130}