From 07fc74ee1decbb2a887eeda1448a83157178f94e Mon Sep 17 00:00:00 2001 From: Ronnie Taylor Date: Fri, 28 Oct 2022 09:47:45 -0700 Subject: [PATCH] Customize the systemd export template Use path to rbenv shim in service start command --- data/export/systemd/process.service.erb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/export/systemd/process.service.erb b/data/export/systemd/process.service.erb index 87497bee..2dec31e9 100644 --- a/data/export/systemd/process.service.erb +++ b/data/export/systemd/process.service.erb @@ -3,14 +3,13 @@ PartOf=<%= app %>.target StopWhenUnneeded=yes [Service] -User=<%= user %> WorkingDirectory=<%= engine.root %> Environment=PORT=<%= port %> Environment=PS=<%= process_name %> <% engine.env.each_pair do |var,env| -%> Environment="<%= var %>=<%= env %>" <% end -%> -ExecStart=/bin/bash -lc 'exec -a "<%= app %>-<%= process_name %>" <%= process.command %>' +ExecStart=/bin/bash -lc 'exec -a /home/"<%= user %>"/.rbenv/shims/"<%= app %>-<%= process_name %>" <%= process.command %>' Restart=always RestartSec=14s StandardInput=null