1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- ##pysystemd
- a systemd binding Library in python
- its Support python 2.7, python3
- ### install
- to install pysystemd use pip install pysystemd
- ### How to use
- this library contains 3 classes
- 1- status
- this class Contain Methods to query the status of the services
- it take the service name as Parameter
- to check if the service running or not you can use()
- is_running
- """ if the service running return 0. """
- to check if the service enable or not you can use
- is_enable()
- """ if the service enabled return 0. """
- 2- services
- this class use to """manage the services like running and stop and reboot."""
- it take the service name as Parameter
- to run service use
- start()
- return 0 if Succeed.
- to stop service use
- stop()
- return 0 if Succeed.
- to restart service use restart()
- to relode service
- use relode()
- 3- list_services
- this class use to list services
- to list all services
- use list_all()
- its return services names as list
- to list all running services
- use list_running()
- its return running services as list
- to list all not running services
- use
- list_dont_running()
- its return dont running services as list
- to list all enable services
- use()
- list_enable
- its return all enabled services as list
- to list all disable services
- use
- list_disable()
- its return all disabled services as list
|