Simple cross-platform Node.js module that provides power off and restart functionality.
- Lightweight
- No dependencies
- Cross-platform: Linux, macOS, Windows and FreeBSD
npm install --save power-control
Note: Your application needs to be run with appropriate permissions for the commands to be successful.
var powerControl = require('power-control');
// Power off system
powerControl.powerOff();
// Restart system
powerControl.restart();
MIT