Reload fail2ban instead of restart

This commit is contained in:
Josue-T 2019-02-13 22:17:32 +01:00 committed by Josué Tille
parent 2d3ff79683
commit e1ccab212a
No known key found for this signature in database
GPG key ID: D5E068C6DFA8681D

View file

@ -195,6 +195,7 @@ def firewall_reload(skip_upnp=False):
"""
from yunohost.hook import hook_callback
from yunohost.service import _run_service_command
reloaded = False
errors = False
@ -276,8 +277,7 @@ def firewall_reload(skip_upnp=False):
# Refresh port forwarding with UPnP
firewall_upnp(no_refresh=False)
# TODO: Use service_restart
os.system("service fail2ban restart")
_run_service_command("reload", "fail2ban")
if errors:
logger.warning(m18n.n('firewall_rules_cmd_failed'))