mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
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:
parent
33f54089b8
commit
3af207a4e8
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user