Switch to a systemd unit Chef resource

This commit is contained in:
Greg Karékinian
2021-07-09 11:32:33 +02:00
parent e9c86081f7
commit d135b3873c
2 changed files with 26 additions and 34 deletions

View File

@@ -1,16 +0,0 @@
[Unit]
Description=Start nodejs app
Requires=redis-server.service
After=redis-server.service
[Service]
ExecStart=<%= @entry %>
User=<%= @user %>
Group=<%= @group %>
<% unless @environment.empty? -%>
Environment=<% @environment.each do |key, value| -%>'<%= key %>=<%= value %>' <% end %>
<% end -%>
Restart=always
[Install]
WantedBy=multi-user.target