Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

strong-service-install

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strong-service-install - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

test/test-cli-systemd.sh

13

bin/sl-svc-install.js

@@ -29,8 +29,9 @@ #!/usr/bin/env node

p(' -h,--help Print this message and exit.');
p(' --name Name to use for service (default derived from app)')
p(' --user User to run service as.');
p(' --group Group to run service as.');
p(' --jobFile Upstart file to create (default /etc/init/<name>.conf)');
p(' --cwd Directory to run the service from.');
p(' --upstart Version of Upstart to assume: 0.6 or 1.4 (default)');
p(' --name NAME Name to use for service (default derived from app)')
p(' --user USER User to run service as.');
p(' --group GROUP Group to run service as.');
p(' --jobFile PATH Upstart file to create (default /etc/init/<name>.conf)');
p(' --cwd PATH Directory to run the service from.');
p(' --upstart [VER] Generate Upstart job for VER: 0.6 or 1.4 (default)');
p(' --systemd Generate systemd service');
}

@@ -0,1 +1,7 @@

2014-11-13, Version 1.1.0
=========================
* Add support for installing systemd services (Ryan Graham)
2014-11-03, Version 1.0.1

@@ -25,7 +31,2 @@ =========================

2014-07-21, Version 0.1.2
=========================
2014-07-21, Version 0.1.1

@@ -42,2 +43,7 @@ =========================

2014-07-21, Version 0.1.2
=========================
* First release!

@@ -7,2 +7,3 @@ var assert = require('assert');

var upstartMaker = require('strong-service-upstart');
var systemdMaker = require('strong-service-systemd');
var uidNumber = require('uid-number');

@@ -71,2 +72,7 @@ var mkdirp = require('mkdirp');

// TODO: select sub-installer here when there's more than just Upstart
if (opts.systemd) {
opts.generator = systemdMaker;
} else {
opts.generator = upstartMaker;
}
if (opts.upstart) {

@@ -138,3 +144,9 @@ opts.version = opts.upstart;

if (!opts.jobFile) {
opts.jobFile = '/etc/init/' + opts.name + '.conf';
if (opts.generator === systemdMaker) {
opts.jobFile = '/etc/systemd/system/' + opts.name + '.service';
} else if (opts.generator === upstartMaker) {
opts.jobFile = '/etc/init/' + opts.name + '.conf';
} else {
return next(new Error('Unknown init type, no path given'));
}
}

@@ -166,3 +178,3 @@

function generateJob(opts, next) {
upstartMaker(opts, function(err, job) {
opts.generator(opts, function(err, job) {
if (!err)

@@ -169,0 +181,0 @@ opts.generatedJob = job;

{
"name": "strong-service-install",
"version": "1.0.1",
"version": "1.1.0",
"description": "Install a module as an OS service",

@@ -35,2 +35,3 @@ "main": "index.js",

"shell-quote": "^1.4.2",
"strong-service-systemd": "^1.0.0",
"strong-service-upstart": "^1.0.0",

@@ -37,0 +38,0 @@ "uid-number": "0.0.5",

@@ -44,8 +44,9 @@ # strong-service-install

-h,--help Print this message and exit.
--name Name to use for service (default derived from app)
--user User to run service as.
--group Group to run service as.
--jobFile Upstart file to create (default /etc/init/<name>.conf)
--cwd Directory to run the service from.
--upstart Version of Upstart to assume: 0.6 or 1.4 (default)
--name NAME Name to use for service (default derived from app)
--user USER User to run service as.
--group GROUP Group to run service as.
--jobFile PATH Upstart file to create (default /etc/init/<name>.conf)
--cwd PATH Directory to run the service from.
--upstart [VER] Generate Upstart job for VER: 0.6 or 1.4 (default)
--systemd Generate systemd service
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc