pystemd
pystemd copied to clipboard
Enable command?
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!
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/