Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Latest commit

 

History

History
43 lines (38 loc) · 2.2 KB

README.md

File metadata and controls

43 lines (38 loc) · 2.2 KB

Module: Service

Manage System Services

p2.service(
  'title',
  options,
  function (err) {
     ... to be called after applying any action ...
  }
)

Options:

Operand Type Description Availability
name String Name of the service to manage (defaults to title)
ensure String stopped/false, running/true (defaults to stopped)
enabled Boolean true, false, or for Windows:
String Manual, Automatic(true), Disabled(false), (create) powershell >= 5.0
Deleted
exec String Executable binary executable (including path) and any optional arguments. If this option is defined and service does not exist, it will be created. (only create) powershell >= 5.0
appdir String Application default directory (create) powershell >= 5.0
application String Application path (for nssm.exe, e.g. node.exe for nodejs) (create) powershell >= 5.0
appparams String Application parameters (e.g. for node.exe would be the server.js file) (create) powershell >= 5.0
srvuser(?) String (proposal) User to run service as (create) powershell >= 5.0
dependson(?) Array (proposal) List of services this service depends upon (create) powershell >= 5.0
description String Description of this service (create) powershell >= 5.0
displayname String Display Name of this service (create) powershell >= 5.0
provider String Override backend provider e.g.: debian, redhat, etc  

Provider Support: (incomplete module - no unit tests yet)

Provider Support Status Unit Tests
debian
redhat
systemd
sysv
upstart
windows