mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +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
|
||||
|
||||
version = 4
|
||||
version = 5
|
||||
|
||||
is_essential = True
|
||||
|
||||
@ -52,8 +52,7 @@ def init():
|
||||
def setup(helper, old_version=None):
|
||||
"""Install the required packages"""
|
||||
helper.install(managed_packages)
|
||||
if not old_version:
|
||||
setup_fail2ban()
|
||||
setup_fail2ban()
|
||||
|
||||
if get_restricted_access_enabled():
|
||||
set_restricted_access(True)
|
||||
@ -62,6 +61,7 @@ def setup(helper, old_version=None):
|
||||
def setup_fail2ban():
|
||||
actions.superuser_run('service', ['unmask', 'fail2ban'])
|
||||
actions.superuser_run('service', ['enable', 'fail2ban'])
|
||||
actions.superuser_run('service', ['reload', 'fail2ban'])
|
||||
|
||||
|
||||
def get_restricted_access_enabled():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user