UNPKG

systemctl

Version:

Allows you to control system services using the systemctl command easily and asynchronously

12 lines (8 loc) 244 B
var exec = require("child-process-promise").exec module.exports = function run(cmd, service_name) { var command = 'systemctl ' + cmd if (service_name) { command = command + ' ' + service_name } return exec(command) }