fail2ban: Pickup new configurations without reboot

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa 2019-01-24 14:28:26 -08:00
parent f113a3bfc9
commit 10581173b5
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -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():