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:
Sunil Mohan Adapa authored and James Valleroy committed 2019-06-13 20:17:53 -04:00
1 parent 4100d36381
commit 862d87920a
7 files changed
+173 -28

No files matched your search

+18
View File
@@ -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()