Skip to content

How to Start and Stop systemd services through dbus? #236

@AliSawari

Description

@AliSawari

I tried to connect to the bus and run commands
but with each time trying to connect to systemd, the program runs into infinite loop.

const dbus = require("dbus");

const someBus = dbus.getBus('system');

someBus.getInterface('org.freedesktop.systemd1',
  '/org/freedesktop/systemd1',
  (err, interface) => {
  if (err) throw new Error(err)
  console.log(interface)
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions