fail2ban: Pickup new configurations without reboot

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa committed 2019-01-24 14:28:26 -08:00
1 parent f113a3bfc9
commit 10581173b5
1 file changed
+3 -3
+3 -3
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():