mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
优化iptables判断
This commit is contained in:
@@ -33,7 +33,8 @@ class firewall_api:
|
||||
__isMac = False
|
||||
|
||||
def __init__(self):
|
||||
if os.path.exists('/usr/sbin/iptables'):
|
||||
iptables_file = mw.systemdCfgDir() + '/iptables.service'
|
||||
if os.path.exists(iptables_file):
|
||||
self.__isIptables = True
|
||||
if os.path.exists('/usr/sbin/firewalld'):
|
||||
self.__isFirewalld = True
|
||||
|
||||
Reference in New Issue
Block a user