Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reload fail2ban instead of restart #649

Merged
merged 1 commit into from Feb 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/yunohost/firewall.py
Expand Up @@ -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
Expand Down Expand Up @@ -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'))
Expand Down