Update firewall.py

pull/815/head
dami 2 days ago
parent a0b4681369
commit a00343d444
  1. 4
      web/utils/firewall.py

@ -196,7 +196,7 @@ class Firewall(object):
if ssh_status[0] != '':
status = False
cmd = "systemctl status sshd.service | grep 'dead'|grep -v grep"
cmd = "systemctl status sshd | grep 'dead'|grep -v grep"
ssh_status = mw.execShell(cmd)
if ssh_status[0] != '':
status = False
@ -467,7 +467,7 @@ class Firewall(object):
rep = r"(#)?PermitRootLogin\s+(\w*)\s*\n"
conf = re.sub(rep, "PermitRootLogin yes\n", conf)
if status == '0':
if status == '1':
rep = r"PermitRootLogin\s+(\w*)\s*\n"
conf = re.sub(rep, "PermitRootLogin yes\n", conf)
else:

Loading…
Cancel
Save