Update firewall_api.py

This commit is contained in:
Mr Chen 2019-02-21 13:44:05 +08:00
parent c1238d523a
commit 1b26079c64
1 changed files with 3 additions and 2 deletions

View File

@ -303,8 +303,9 @@ class firewall_api:
return False
return True
if self.__isFirewalld:
data = public.execShell(
"ps -ef|grep firewalld |grep -v grep | grep -v python | awk '{print $2}'")
cmd = "ps -ef|grep firewalld |grep -v grep | grep -v python | awk '{print $2}'"
print cmd
data = public.execShell(cmd)
if data[0] == '':
return False
return True