diff --git a/data/actionsmap/yunohost.yml b/data/actionsmap/yunohost.yml index 867404fd0..053aee467 100644 --- a/data/actionsmap/yunohost.yml +++ b/data/actionsmap/yunohost.yml @@ -1017,6 +1017,9 @@ firewall: reload: action_help: Reload all firewall rules api: PUT /firewall + configuration: + authenticate: false + lock: false ### firewall_allow() allow: diff --git a/src/yunohost/firewall.py b/src/yunohost/firewall.py index c0b06e64b..59c6a1a03 100644 --- a/src/yunohost/firewall.py +++ b/src/yunohost/firewall.py @@ -199,6 +199,10 @@ def firewall_reload(): reloaded = False errors = False + # Do not continue if YunoHost is not configured + try: open('/etc/yunohost/installed') + except IOError: return True + # Check if SSH port is allowed ssh_port = _get_ssh_port() if ssh_port not in firewall_list()['opened_ports']: