<commit_before># Systemd unit file for tomcat_<%= @instance %>

[Unit]
Description=<%= @instance %> Apache Tomcat Application
After=syslog.target network.target

[Service]
Type=simple

<% @env_vars.each do |h| -%>
  <% h.each_pair do |k,v| -%>
Environment="<%= k -%>=<%= v %>"
  <% end -%>
<% end -%>

ExecStart=<%= @install_path %>/bin/catalina.sh run
ExecStop=<%= @install_path %>/bin/catalina.sh stop

User=tomcat_<%= @instance %>
Group=tomcat_<%= @instance %>

[Install]
WantedBy=multi-user.target
<commit_msg>Restart on failure in systemd<commit_after># Systemd unit file for tomcat_<%= @instance %>

[Unit]
Description=<%= @instance %> Apache Tomcat Application
After=syslog.target network.target

[Service]
Type=simple

<% @env_vars.each do |h| -%>
  <% h.each_pair do |k,v| -%>
Environment="<%= k -%>=<%= v %>"
  <% end -%>
<% end -%>

ExecStart=<%= @install_path %>/bin/catalina.sh run
ExecStop=<%= @install_path %>/bin/catalina.sh stop
Restart=on-failure

User=tomcat_<%= @instance %>
Group=tomcat_<%= @instance %>

[Install]
WantedBy=multi-user.target

{'fraction_non_alphanumeric': 0.20319849482596425, 'fraction_numerical': 0.0, 'mean_word_length': 5.1502890173410405, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '2821437', 'n_tokens_mistral': 442, 'n_tokens_neox': 401, 'n_words': 89}