Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aaPanel/BaoTa
/ GetServiceStatus
Method
GetServiceStatus
class/firewalld.py:315–319 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
313
314
# 取服务状态
315
def
GetServiceStatus(self):
316
import
psutil
317
for
pid in psutil.pids():
318
if
psutil.Process(pid).name() ==
'firewalld'
:
return
True
319
return
False
320
321
# 服务控制
322
def
FirewalldService(self, type):
Callers
nothing calls this directly
Calls
1
name
Method · 0.45
Tested by
no test coverage detected