Socket
Book a DemoInstallSign in
Socket

svcinstall

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svcinstall

Service installer for OSX and Linux

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

SvcInstall

SvcInstall installs services on OSX (launchd) and Linux (inet.d start-stop-dameon)

  • Small and lightweight
  • Avoid coupling with any keep alive or monitoring solution. You Pick ( SvcHost is decoupled sister project)
  • Can point a node project, a shell script, etc... Whatever you choose.
  • Package installer with your app or service

Install:

npm install svcinstall --save

Sample:

See /samples for more

var path = require('path');
var si = require('svcinstall');

var scriptPath = path.join(__dirname, 'server.js');
var options = { 
		args: ['/usr/local/bin/node', scriptPath],
		workingDirectory: path.dirname(scriptPath)
	};

var svcinstall = new si.SvcInstall();
svcinstall.install('myserver.com.sample', options, function(err, config){
	if (err) {
		console.error('Error:', err.message);
		return;
	}

	console.log('Installed Successfully');

	svcinstall.start(config.definition, function(err) {
		if (err) {
			console.error('Failed to start: ', err.message);
			return;
		}

		console.log('Started Successfully');
	});
});

License

Apache 2.0

Keywords

node.js

FAQs

Package last updated on 13 Nov 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