systemctl-node

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i systemctl-node

Weekly Downloads

5

Version

1.0.2

License

MIT

Unpacked Size

10.4 kB

Total Files

12

Last publish

Collaborators

  • obediah