enable firewalld centos 8

This commit is contained in:
Usman Nasir
2020-05-29 23:10:00 +05:00
parent 591d398e2a
commit 7ef5fac736
3 changed files with 4 additions and 4 deletions

View File

@@ -54,7 +54,7 @@
</div> </div>
<div ng-hide="SpamAssassinSuccessfullyInstalled" class="alert alert-success"> <div ng-hide="SpamAssassinSuccessfullyInstalled" class="alert alert-success">
<p>{% trans "SpamAssassin successfully installed, refreshing page in 3 seconds.." %}</p> <p>{% trans "MailScanner successfully installed, refreshing page in 3 seconds.." %}</p>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -56,6 +56,8 @@ class FirewallUtilities:
@staticmethod @staticmethod
def deleteRule(proto, port): def deleteRule(proto, port):
print('Adding port: %s' % (port))
if port=="21": if port=="21":
command = "sudo firewall-cmd --remove-service=ftp --permanent" command = "sudo firewall-cmd --remove-service=ftp --permanent"
else: else:

View File

@@ -1244,8 +1244,6 @@ imap_folder_list_limit = 0
def installFirewalld(self): def installFirewalld(self):
if self.distro == cent8:
return 0
if self.distro == ubuntu: if self.distro == ubuntu:
self.removeUfw() self.removeUfw()
@@ -1260,7 +1258,7 @@ imap_folder_list_limit = 0
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
###### ######
if self.distro == centos or self.distro == cent8: if self.distro == centos:
# Not available in ubuntu # Not available in ubuntu
command = 'systemctl restart dbus' command = 'systemctl restart dbus'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)