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-nodeInstall systemctl-node with yarn
yarn add systemctl-nodeUsage/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