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

Install a module as an OS service

  • 1.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
137
increased by5.38%
Maintainers
4
Weekly downloads
 
Created
Source

strong-service-install

Create/install system service for a given app.

Currently only supports Upstart, via strong-service-upstart.

Installation

npm install strong-service-install

Usage

var installer = require('strong-service-install');

var opts = {
  name: 'my-app',
  author: require('package.json').author,
  user: process.env.USER,
  command: 'my-app --with args --that work',
  cwd: process.env.HOME,
};

installer(opts, function(err, result) {
  if (err) {
    console.error('Failed to install "my-app" service:', err.message);
    process.exit(1);
  } else {
    console.log('Successfully installed "my-app" service:', result);
    process.exit(0);
  }
});

CLI

There is a minimal CLI that exposes the API options as arguments:

usage: sl-svc-install [options] -- <app and args>

Options:
  -h,--help        Print this message and exit.
  --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

Keywords

FAQs

Package last updated on 13 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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