RFE: provide service status querying
TurboTurtle opened this issue · 1 comments
TurboTurtle commented
Are there any plans for this project to support querying service status from systemd? Or for that matter, controlling services via start/stop/restart requests (provided permissions are sufficient of course)?
For example, I'd like to be able to do something like the following:
from systemd import Service
svc = Service('my-cool-service')
status = svc.status() # similar content to running 'systemctl status my-cool-service'
if svc.is_active():
... do stuff...
else:
svc.start()keszybz commented
For that, use https://github.com/facebookincubator/pystemd instead.