mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 00:06:09 +01:00
enable firewalld centos 8
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
@@ -56,6 +56,8 @@ class FirewallUtilities:
|
||||
|
||||
@staticmethod
|
||||
def deleteRule(proto, port):
|
||||
print('Adding port: %s' % (port))
|
||||
|
||||
if port=="21":
|
||||
command = "sudo firewall-cmd --remove-service=ftp --permanent"
|
||||
else:
|
||||
|
||||
@@ -1244,8 +1244,6 @@ imap_folder_list_limit = 0
|
||||
|
||||
def installFirewalld(self):
|
||||
|
||||
if self.distro == cent8:
|
||||
return 0
|
||||
if self.distro == ubuntu:
|
||||
self.removeUfw()
|
||||
|
||||
@@ -1260,7 +1258,7 @@ imap_folder_list_limit = 0
|
||||
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
|
||||
command = 'systemctl restart dbus'
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
Reference in New Issue
Block a user