Merge pull request #294 from bfulton/master

add systemd export
This commit is contained in:
David Dollar
2013-04-22 20:37:39 -07:00
13 changed files with 216 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
[Unit]
+18
View File
@@ -0,0 +1,18 @@
[Unit]
StopWhenUnneeded=true
[Service]
User=<%= user %>
WorkingDirectory=<%= engine.root %>
Environment=PORT=<%= port %><% engine.env.each_pair do |var,env| %>
Environment=<%= var.upcase %>=<%= env %><% end %>
ExecStart=/bin/bash -lc '<%= process.command %>'
Restart=always
StandardInput=null
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=%n
KillMode=process
[Install]
WantedBy=<%= app %>-<%= name %>.target
@@ -0,0 +1,5 @@
[Unit]
StopWhenUnneeded=true
[Install]
WantedBy=<%= app %>.target