From 3af207a4e809072667c9b008f84a4f2e05dd2522 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 26 Feb 2019 18:17:26 -0800 Subject: [PATCH] sso: Pre-enable necessary apache modules To avoid Apache restart during installation (although sso is an essential app and this is not an issue). Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- actions/apache | 1 + actions/auth-pubtkt | 7 ------- plinth/modules/sso/__init__.py | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/actions/apache b/actions/apache index 46ad82c84..8028d6e8c 100755 --- a/actions/apache +++ b/actions/apache @@ -135,6 +135,7 @@ def subcommand_setup(arguments): # Various modules for authentication/authorization webserver.enable('authnz_ldap', kind='module') + webserver.enable('auth_pubtkt', kind='module') # enable some critical modules to avoid restart while installing # FreedomBox applications. diff --git a/actions/auth-pubtkt b/actions/auth-pubtkt index 71e584bdc..e06415d28 100755 --- a/actions/auth-pubtkt +++ b/actions/auth-pubtkt @@ -40,8 +40,6 @@ def parse_arguments(): subparsers.add_parser( 'create-key-pair', help='create a key pair for the apache server ' 'to sign auth_pubtkt tickets') - subparsers.add_parser('enable-mod', - help='enabled the Apache module auth_pubtkt') gen_tkt = subparsers.add_parser('generate-ticket', help='generate auth_pubtkt ticket') gen_tkt.add_argument('--uid', help='username of the user') @@ -54,11 +52,6 @@ def parse_arguments(): return parser.parse_args() -def subcommand_enable_mod(_): - """Safety check to make sure auth_pubtkt is enabled""" - action_utils.webserver_enable('auth_pubtkt', kind='module') - - def subcommand_create_key_pair(_): """Create public/private key pair for signing the auth_pubtkt tickets. diff --git a/plinth/modules/sso/__init__.py b/plinth/modules/sso/__init__.py index f44dd4911..88d3200ed 100644 --- a/plinth/modules/sso/__init__.py +++ b/plinth/modules/sso/__init__.py @@ -37,5 +37,4 @@ managed_packages = [ def setup(helper, old_version=None): """Install the required packages""" helper.install(managed_packages) - actions.superuser_run('auth-pubtkt', ['enable-mod']) actions.superuser_run('auth-pubtkt', ['create-key-pair'])