Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 813 Bytes

README.md

File metadata and controls

46 lines (34 loc) · 813 Bytes

python-ctrldaemon

Service command wrapper for Python.

Usage

Create object

from ctrldaemon import ControlDaemon
obj = ControlDaemon("service") # Example "httpd" (Apache)

Start service

from ctrldaemon import ControlDaemon
obj = ControlDaemon("service") # Example "httpd" (Apache)
obj.start()

Stop service

from ctrldaemon import ControlDaemon
obj = ControlDaemon("service") # Example "httpd" (Apache)
obj.stop()

Restart service

from ctrldaemon import ControlDaemon
obj = ControlDaemon("service") # Example "httpd" (Apache)
obj.restart()

Memory

from ctrldaemon import ControlDaemon
obj = ControlDaemon("service") # Example "httpd" (Apache)
obj.get_memory_usage()