mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
fail2ban: Pickup new configurations without reboot
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
f113a3bfc9
commit
10581173b5
@ -25,7 +25,7 @@ from plinth.menu import main_menu
|
|||||||
|
|
||||||
from .manifest import backup
|
from .manifest import backup
|
||||||
|
|
||||||
version = 4
|
version = 5
|
||||||
|
|
||||||
is_essential = True
|
is_essential = True
|
||||||
|
|
||||||
@ -52,7 +52,6 @@ def init():
|
|||||||
def setup(helper, old_version=None):
|
def setup(helper, old_version=None):
|
||||||
"""Install the required packages"""
|
"""Install the required packages"""
|
||||||
helper.install(managed_packages)
|
helper.install(managed_packages)
|
||||||
if not old_version:
|
|
||||||
setup_fail2ban()
|
setup_fail2ban()
|
||||||
|
|
||||||
if get_restricted_access_enabled():
|
if get_restricted_access_enabled():
|
||||||
@ -62,6 +61,7 @@ def setup(helper, old_version=None):
|
|||||||
def setup_fail2ban():
|
def setup_fail2ban():
|
||||||
actions.superuser_run('service', ['unmask', 'fail2ban'])
|
actions.superuser_run('service', ['unmask', 'fail2ban'])
|
||||||
actions.superuser_run('service', ['enable', 'fail2ban'])
|
actions.superuser_run('service', ['enable', 'fail2ban'])
|
||||||
|
actions.superuser_run('service', ['reload', 'fail2ban'])
|
||||||
|
|
||||||
|
|
||||||
def get_restricted_access_enabled():
|
def get_restricted_access_enabled():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user