JSPM

systemctl-node

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q18977F
  • License MIT

C bindings for service control with Systemd - systemctl lib

Package Exports

  • systemctl-node
  • systemctl-node/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (systemctl-node) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

systemctl-node

A simple control module from C bindings for service control with Systemd - systemctl lib (created for Ubuntu/Debian systems)

Installation

Install systemctl-node with npm

  npm install systemctl-node

Install systemctl-node with yarn

  yarn add systemctl-node

Usage/Examples

Requires privilege escalation - (run with sudo)

// app.js

const systemctl = require("systemctl-node");

/* Start service */
systemctl.start("nginx")

/* Stop service */
systemctl.stop("nginx")

/* Restart service */
systemctl.restart("nginx")

Run app

$ sudo node app.js

Authors

License

MIT