mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Reload fail2ban instead of restart
This commit is contained in:
parent
2d3ff79683
commit
e1ccab212a
1 changed files with 2 additions and 2 deletions
|
@ -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'))
|
||||
|
|
Loading…
Add table
Reference in a new issue