pystemd
pystemd copied to clipboard
How to enable/disable units?
I cannot find any example on how to enable/disable units. Can someone elaborate on how this can be done using this lib?
I can see there is a function called EnableUnitFiles
but I am not sure how it should be used!
Try this:
from pystemd.systemd1 import Manager
with Manager() as manager:
manager.Manager.EnableUnitFiles([b'/etc/systemd/system/service_name.service'], True, True)
What are the True
values for?