Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AliSawari opened this issue Feb 13, 2022 · 1 comment
Open

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

AliSawari opened this issue Feb 13, 2022 · 1 comment

Comments

@AliSawari
Copy link

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)
})
@sergeylukin
Copy link

.getInterface expects 4 arguments, you're missing the interface value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants