mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Introduce uwsgi component to manage uWSGI configuration
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
4100d36381
commit
862d87920a
7 files changed
+173
-28
No files matched your search
@@ -46,6 +46,14 @@ def parse_arguments():
|
||||
subparser.add_argument('--name',
|
||||
help='Name of the site/config/module to disable')
|
||||
subparser.add_argument('--kind', choices=['site', 'config', 'module'])
|
||||
subparser = subparsers.add_parser(
|
||||
'uwsgi-enable', help='Enable a site/config/module in UWSGI')
|
||||
subparser.add_argument('--name',
|
||||
help='Name of the site/config/module to enable')
|
||||
subparser = subparsers.add_parser(
|
||||
'uwsgi-disable', help='Disable a site/config/module in UWSGI')
|
||||
subparser.add_argument('--name',
|
||||
help='Name of the site/config/module to disable')
|
||||
|
||||
subparsers.required = True
|
||||
return parser.parse_args()
|
||||
@@ -177,6 +185,16 @@ def subcommand_disable(arguments):
|
||||
action_utils.webserver_disable(arguments.name, arguments.kind)
|
||||
|
||||
|
||||
def subcommand_uwsgi_enable(arguments):
|
||||
"""Enable uWSGI configuration and reload."""
|
||||
action_utils.uwsgi_enable(arguments.name)
|
||||
|
||||
|
||||
def subcommand_uwsgi_disable(arguments):
|
||||
"""Disable uWSGI configuration and reload."""
|
||||
action_utils.uwsgi_disable(arguments.name)
|
||||
|
||||
|
||||
def main():
|
||||
"""Parse arguments and perform all duties"""
|
||||
arguments = parse_arguments()
|
||||
|
||||
Reference in new issue
Block a user