johnbellone/consul-cookbook

View on GitHub
templates/default/systemd.service.erb

Summary

Maintainability
Test Coverage
[Unit]
Description=<%= @name %>
Wants=network.target
After=network.target

[Service]
Environment=<%= @environment.map {|key, val| %Q{"#{key}=#{val}"} }.join(' ') %>
ExecStart=<%= @command %>
ExecReload=/bin/kill -<%= @reload_signal %> $MAINPID
KillSignal=<%= @stop_signal %>
User=<%= @user %>
WorkingDirectory=<%= @directory %>

[Install]
WantedBy=multi-user.target