Skip to content

Commit

Permalink
Merge pull request #18 from andrew-vant/upstart-env-vars
Browse files Browse the repository at this point in the history
envVars for Upstart handled with env stanzas
  • Loading branch information
arvind-agarwal committed Jan 29, 2015
2 parents d4acbd4 + 300bd45 commit 1170290
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion templates/upstart/upstart.template
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ env KILLWAITTIME={{forceKillWaitTime|default('5000')}}

chdir {{cwd}}

exec {{envVars|default('')}} {{foreverPath}}forever -a -l $LOGFILE --minUptime $MIN_UPTIME --spinSleepTime $SPIN_SLEEP_TIME --killSignal $KILL_SIGNAL {{foreverOptions|default('')}} --uid {{service}} start {{script|default('app.js')}} {{scriptOptions|default('')}}
{%- if envVars|default(false) %}
{%- for v in envVars.split(" ") %}
env {{ v }}
{%- endfor %}
{%- endif %}

exec {{foreverPath}}forever -a -l $LOGFILE --minUptime $MIN_UPTIME --spinSleepTime $SPIN_SLEEP_TIME --killSignal $KILL_SIGNAL {{foreverOptions|default('')}} --uid {{service}} start {{script|default('app.js')}} {{scriptOptions|default('')}}

post-start script
echo "{{service}} started"
Expand Down

0 comments on commit 1170290

Please sign in to comment.