mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 08:16:11 +01:00
enable firewalld centos 8
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user