Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
a658abc9
Commit
a658abc9
authored
Oct 08, 2016
by
Michael Kroes
Committed by
Joshua Tauberer
Oct 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix status checks for ufw when the system doesn't support iptables (#961)
parent
9331dbc5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
CHANGELOG.md
CHANGELOG.md
+1
-0
status_checks.py
management/status_checks.py
+8
-1
No files found.
CHANGELOG.md
View file @
a658abc9
...
...
@@ -7,6 +7,7 @@ In Development
Control panel:
*
Remove recommendations for Certificate Providers
*
Status checks failed if the system doesn't support iptables
v0.20 (September 23, 2016)
--------------------------
...
...
management/status_checks.py
View file @
a658abc9
...
...
@@ -169,8 +169,15 @@ def run_system_checks(rounded_values, env, output):
check_free_memory
(
rounded_values
,
env
,
output
)
def
check_ufw
(
env
,
output
):
ufw
=
shell
(
'check_output'
,
[
'ufw'
,
'status'
])
.
splitlines
(
)
code
,
ufw
=
shell
(
'check_output'
,
[
'ufw'
,
'status'
],
trap
=
True
)
if
code
!=
0
:
# The command failed, it's safe to say the firewall is disabled
output
.
print_warning
(
"""The firewall is not working on this machine. An error was received
while trying to check the firewall. To investigate run 'sudo ufw status'."""
)
return
ufw
=
ufw
.
splitlines
()
if
ufw
[
0
]
==
"Status: active"
:
not_allowed_ports
=
0
for
service
in
get_services
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment