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

Enable command? #91

Open
picarro-aegger opened this issue Jan 23, 2024 · 1 comment
Open

Enable command? #91

picarro-aegger opened this issue Jan 23, 2024 · 1 comment

Comments

@picarro-aegger
Copy link

Hello, I dug through the code and couldn't find an enable command. Is there an ability to enable a service so it comes up on reboot? This is specifically for Instantiated Services. Thank you for this module!

@eliskvitka
Copy link

from pystemd.systemd1 import Manager

with Manager() as manager:
    manager.Manager.EnableUnitFiles(['service_name.service'.encode()], False, True)

Look at the systemd DBus API:
https://www.freedesktop.org/wiki/Software/systemd/dbus/

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