Generate an Upstart job using the provided parameters.
npm install strong-service-upstart
var fs = ;var upstart = ;// Generate Upstart job for my-app;// Also supports synchronous modefs;
This module supports a subset of those used in the node-linux templates:
name- name of service. In comments in v1.4 and syslog tagging in v0.6.
nameis an alias for
description- multi-word description of service.
descriptionis an alias for
author- sets author field of Upstart job (defaults to current user)
cwd- working directory to run service from (defaults to
user- user to run service as (defaults to
group- group to run service as (Upstart v1.4 only, defaults to
execpath- path to binary to executable
script- arguments to execpath (such as a script)
created- timestamp used in generated job (defaults to current time)
env- environment variables to set in Upstart job
version- Upstart version to target:
template- override internal template
Upstart v1.4 added support for setuid and setgid, so the default template requires Upstart v1.4.
A job file compatible with older versions of Upstart can be generated by
version: '0.6' in the options (or by providing your own template).
Templates use _.template from Lodash using
EJS style syntax:
<%= option %>.