systemd-manager
Exposes systemd manager through dbus
Last updated 2 years ago by swapscaps .
GPL · Original npm · Tarball · package.json
$ cnpm install systemd-manager 
SYNC missed versions from official npm registry.

Systemd Manager

About

Uses dbus-native to connect to the systemd.manager

Usage


SystemdManager = require "systemd-manager"

systemd = new SystemdManager dbusSocket: "/var/run/dbus/system_bus_socket"

unitEvents = [ "UnitNew", "UnitRemoved", "JobNew", "JobRemoved", "StartupFinished" ]

# Systemd is an event emitter
unitEvent.forEach (event) ->
  systemd.on event, console.log

# Init systemd
systemd.init (error, manager) ->
  throw error if error
  manager.RestartUnit "NetworkManager.service", "replace", (error, info) ->
    throw error if error
    console.log('info', info)

Current Tags

  • 0.0.1                                ...           latest (2 years ago)

1 Versions

  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |