We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm puzzled on how to manage a "user service" via this package. Help is greatly appreciated.
func TestGithubIssue(t *testing.T) { ctx := context.Background() dbusConn, err := dbus.NewUserConnectionContext(ctx) require.NoError(t, err, "creating new dbus connection") defer dbusConn.Close() spew.Dump(dbusConn.GetUnitPropertiesContext(ctx, "longrunning.service")) }
Outputs:-
=== RUN TestGithubIssue (map[string]interface {}) <nil> (dbus.Error) Process org.freedesktop.systemd1 exited with status 1
However, from CLI, I'm able to get the status of service.
➤ systemctl --user status longrunning.service ○ longrunning.service - longrunning Loaded: loaded (/home/arastogi/.config/systemd/user/longrunning.service; static) Active: inactive (dead)
I was able to find this previous Github issue, but it didn't really have an answer. #424 (comment)
I tried sending dbus messages directly, I get the same error.
➤ eval `dbus-launch --auto-syntax` >>> 0s elapsed... ➜ $?=0 @arastogi-ld1 bincontrol/systemd (master↑1|✚3…) [5:53:26] ➤ dbus-send --print-reply --dest=org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager.StartUnit string:'[email protected]' string:'replace' Error org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
My research so far below:-
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm puzzled on how to manage a "user service" via this package. Help is greatly appreciated.
Outputs:-
However, from CLI, I'm able to get the status of service.
I was able to find this previous Github issue, but it didn't really have an answer. #424 (comment)
I tried sending dbus messages directly, I get the same error.
My research so far below:-
The text was updated successfully, but these errors were encountered: