mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Allow yunohost firewall service to be run even if YunoHost is unconfigured
This commit is contained in:
parent
813ab01e9d
commit
95cbff27a9
2 changed files with 7 additions and 0 deletions
|
@ -1017,6 +1017,9 @@ firewall:
|
|||
reload:
|
||||
action_help: Reload all firewall rules
|
||||
api: PUT /firewall
|
||||
configuration:
|
||||
authenticate: false
|
||||
lock: false
|
||||
|
||||
### firewall_allow()
|
||||
allow:
|
||||
|
|
|
@ -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']:
|
||||
|
|
Loading…
Add table
Reference in a new issue