Commit 3b78a8d9 authored by yodax's avatar yodax Committed by Joshua Tauberer

If ufw isn't installed on the machine the status checks shouldn't fail

parent 6ea1a06a
...@@ -169,6 +169,10 @@ def run_system_checks(rounded_values, env, output): ...@@ -169,6 +169,10 @@ def run_system_checks(rounded_values, env, output):
check_free_memory(rounded_values, env, output) check_free_memory(rounded_values, env, output)
def check_ufw(env, output): def check_ufw(env, output):
if not os.path.isfile('/usr/sbin/ufw'):
output.print_warning("""The ufw program was not installed. If your system is able to run iptables, rerun the setup.""")
return
code, ufw = shell('check_output', ['ufw', 'status'], trap=True) code, ufw = shell('check_output', ['ufw', 'status'], trap=True)
if code != 0: if code != 0:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment