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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2019-02-26 18:17:26 -08:00 committed by James Valleroy
parent 33f54089b8
commit 3af207a4e8
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
3 changed files with 1 additions and 8 deletions

View File

@ -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.

View File

@ -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.

View File

@ -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'])