strong-service-systemd
Generate an systemd service using the provided parameters.
Install
npm install strong-service-systemd
Basic Usage
var fs = ;var systemd = ; // Generate systemd service for my-app; // Also supports synchronous modefs;
Options
This module supports a subset of those used in the node-linux templates:
name
- name of service.name
is an alias forlabel
andservicesummary
.description
- multi-word description of service.description
is an alias forservicedescription
.author
- sets author field of systemd job (defaults to current user)cwd
- working directory to run service from (defaults to/
)user
- user to run service as (defaults tonodbody
)group
- group to run service as (defaults tonogroup
)execpath
- path to binary to executablescript
- arguments to execpath (such as a script)created
- timestamp used in generated job (defaults to current time)env
- environment variables to set in systemd jobtemplate
- override internal template
Template Format
Templates use _.template from Lodash using
EJS style syntax: <%= option %>
.